Create a background video for the HTML site with the use of the Azure Storage Account

Using background videos on websites has become quite common nowadays. I recently discovered the capabilities available within the Azure Storage Account, and I’ve come to realize that embedding a background video on a website through a Storage Account is a straightforward process.

To get started, you should create a container within your Azure Storage Account. After creating the container, set the public access level option to “Blob (anonymous read access for blob only).” This configuration will allow you to make the video content accessible for embedding on your website.

blob1

After uploading the video you intend to use, navigate to the properties of the uploaded video file within your Azure Storage Account. From there, you can obtain the video URL, which will be inserted into your website’s code to embed the background video.

blob2

blob3Read More »

Guide to drop documents in Azure documentDB (new CosmosDB)

A few months ago, I took on the responsibility of managing a non-relational DocumentDB database, which has since been updated to CosmosDB, hosted on Azure. During this journey, I encountered challenges, particularly when it came to deleting specific records. It became evident that understanding how partitions work and selecting the correct partition by ID played a pivotal role in overcoming these obstacles.

To facilitate this process, I developed a Windows console application sample in C#. This application serves to collect document IDs based on a query and subsequently deletes the documents associated with those IDs. This tool has proven to be invaluable in efficiently managing and maintaining our database, streamlining the deletion process for optimal database performance.

Initially we install the libraries Microsoft.Azure.DocumentDB and Newtonsoft.Json.

libraries.png

To establish a connection between the DocumentDB database and the Windows console application, you will require the necessary credentials, including the URI and primary key. These credentials can be found in the “keys” tab within the Azure portal.

Untitled-1

Next, you’ll need to initialize the DocumentDB URI, primary key, as well as specify the collection and database names.

private const string connectionEndpointUri ="https://dropdocuments.documents.azure.com:443/";
private const string primaryKey = "Kl9XbLDeSPjcmoJra7tKkHblfamvhmxFdzcw7LN3Pl44ENCdBYHax6krgmqGgqfpRbUEj73Rml0YAOR2ALJBZg==";
private static string databaseId = @"DatabaseName";
private static string collectionId = @"CollectionName";
private Uri collectionLink = UriFactory.CreateDocumentCollectionUri(databaseId, collectionId);

Read More »