Tuesday, 30 March 2021

Connect your Azure App Service to Custom Domain


In this article, we will learn how we can add a custom domain to our website. I hope you are already aware of how to publish the website to Azure. Once you publish the website on azure you will get a URL like xxx.azurewebsites.net. Now you want your domain name let’s say www.abc.com to open the website xxx.azurewebsites.net that is hosted on Azure.


Step 1: Ensure your website is published on a minimum B1 Plan because the Custom Domain feature is not available on Free Plan (F1)









Step 2: Go to App Services -> Custom Domains, Click on it.
























Step 3: Click on Add Custom Domain Button

Step 4: Enter your custom domain e.g. (www.abc.com) and click validate button.              















Step 5: It will ask you to select either A record or CNAME. You can choose any one option. You need to prove the domain ownership. In this article, we will use A record.









Step 6: Select A record and scroll down, it will display Type txt and A value. We need to enter these values into our domain provider DNS Settings.























Step 7: Open the website of your domain provider. Let’s say you have purchased the domain from GoDaddy or BigRock. Open their website and go to My Products.


Step 8: Click on your domain and go to the DNS section.
















Step 9: Update A Type and Txt Value here.




















Wait for 10-15 mins and you can see your website is up and running.

Now when you will open abc.com it will open the same website that is deployed to Azure. This is all about this article. I hope you like it.




Saturday, 19 December 2020

Add Project Code into Azure DevOps through Visual Studio and Command Line

There are a couple of ways to add a new project or existing project in the DevOps. Let’s take the example of an existing offline project and you want to check-in to DevOps.

Push the code through Visual Studio


Before that, you need a Repository in the DevOps. I hope you already have, If not, let’s first create the new Repo in the Azure DevOps 

Step 1: Go To Azure DevOps, create a new repository in your Project. If you don’t have any project in your DevOps then first create a new project. In my example, I already have a project, so I’m creating a brand new repository in this.

Step 2: Click on the new repository option and create a new repo.








Step 3: Specify the Repository name and press the create button and it will create a new repo.













Step 4: Click on the clone button and copy the URL.













The repository is ready and let’s learn how to push code in this repo through Visual Studio.

Step 5: Open your existing/newly created project in Visual Studio.
Step 6: Right-click on the solution file and click add the solution to source control.













Now you can see the lock symbol in the files. In Team Explorer, Branches, you can see it has created a new Master branch. If you don't see this option in the Visual Studio then you can choose the alternate option, push the code through the command line, mentioned below.

Step 7: Go to team explorer, Click on the Sync tab, and select the push Git Repo button.
Step 8: Enter the URL that we have copied above in the Clone option and press publish.












Now you can see the code in the master branch in Azure DevOps. If you are on the main branch then, you need to switch to the master branch in Azure DevOps.
















Let's learn another way to push the code to Azure DevOps.

Push the code through the Command line

I have created a blank .Net Core project in my Visual Studio and created new blank Repo in Azure DevOps name SecondRepo. Now, will push that code through the command line.

Step 1 to Step 4 is the same.

Step 5: Go to your project location and open the command prompt.
Step 6: Create a Git repo on your machine to store your code by running the below command.

          git init





Step 7: Commit your code into the local git repository and run the below commands

        git add --all
        git commit -m "first commit through command line"

Step 8: Connect your local repo to the Git repo in Azure Repos using the command mentioned below and enter your repo URL.
                


Step 9: Push the code.

        git push origin master
















Now, if you go to Azure DevOps, you can see all the code in the repository.























This is all about this article. I hope you like it.


How to get PowerBI Embed Token

 Here's a step-by-step guide to help you through the process. Step 1: Register Your App in Azure 1. Go to Azure Portal → App registratio...