Posts

Showing posts from December, 2022

Azure Blob Storage With ASP.NET Core

Image
This blog will show you how to create a container and files in Azure Blob Storage. You must first install the Azure.Storage.Blobs package. Install-Package Azure.Storage.Blobs Create a container in Azure Blob Storage Let's start by learning how to create a container in Azure Blob Storage. A connection string is required for this. Go to Azure Blob Storage -> Access keys for that. There are two key values there. Choose the first option. The connection string will be concealed. When you click the show button on the right side, the connection string will be revealed. You can now copy the connection string. A code snippet for creating a container in Azure Storage is provided below. The connection string has been set up here. The instance of BlobContainerClient has been created. Using the BlobContainerClient instance, determine whether the container name exists or not, and if not, create a new container with the given name. The container name must adhere to the followi

Import an Azure DevOps Repository from a Different Azure DevOps Repository

Image
This blog will walk you through the process of importing an Azure DevOps Repository from another Azure Repository. Let's take it one step at a time. Step 1: To begin, navigate to the source project, select Repos, and then Files. Step 2: Click the Clone button on the right hand side of the top. Step 3: When you click the Clone button, the 'Clone Repository' popup appears. Then, click the 'Generate Git Credentials' button. Step 4: The username and password will then be displayed. We'll need three things for this step: a command line, a username, and a password. Step 5: Select Repos and then files to import the repository for a new project. And then click the Import button. If you want to add repository to an existing project, use Import Repositoty. Step 6: The 'Import a Git repository' popup will appear. In that box, enter the Clone URL and check the 'Requires Authentication' checkbox. It will display textboxes where you can e

File Download at Custom Path in Selenium with C#

Image
This blog will show you how to download files from websites and save them to a folder. When you use selenium to download a file from a website, the file is saved in the default download folder. Chrome options must be used to save a downloaded file to the desired location. Let's see how we can do that. The code snippet below will download and save a file from a website. ChromeOptions() has been initialized here. In AddUserProfilePreference, download.default directory, enter the path of the directory where you want to save the downloaded file. using   OpenQA . Selenium ; using   OpenQA . Selenium . Chrome ; using   System ; using   System . Threading ; using   System . Windows . Forms ; using   WebDriverManager ; using   WebDriverManager . DriverConfigs . Impl ; using   WebDriverManager . Helpers ; private   void   DownloadButton_Click ( object   sender ,  EventArgs   e ) {      // Download the same version of chromedriver      var   chromeDriverPath   =   new   DriverManager