Thursday 26 August 2021

Not receiving an email in Google Workspace formerly (G Suite)

MX Settings

In this article, we will learn how to do the MX Setting for Google Workspace formerly(G Suite). First, let's learn how to set up Your personal email Id.

Step 1: Go to https://workspace.google.com/ and click on the Start Trial button.

Step 2: Fill in the information. I have selected the Just you option for myself.



















Step 3: Fill in the contact information.



Step 4: I hope you already have the domain and press the domain below.












Step 5: Enter your domain name.















Step 6: Enter the email Id that you want to create.















Step 7: Your account is ready.


Step 8: Verify your domain, once you will verify it will automatically insert entries in your domain provider DNS settings. 



In my case, I have purchased a domain for GoDaddy. and you can see the setting in DNS Section. Go to the Manage DNS section in your domain settings(GoDaddy portal).







In DNS Management, you can find below verification TXT code is already there.








Note: We need to do Mx settings that we need to add manually. If you will not do these settings, you will not receive an email. These MX settings are common for all users/domains. You need to press the add button and do the entry like below









As shown in the snapshot below, you need to do 5 entries.





Once you do all the settings. You will start receiving emails in 10-15 mins. This is all about this article. I hope you like it.

Sunday 30 May 2021

SQL Server: Remove SQL Express from Server Name

We will learn how we can convert named instances to default instances. We will connect the server without writing SQL Express. 


Step 1: Open SQL Server Configuration Manager. Search in the laptop for SQL Server Configuration and select as shown in the snapshot below.





















Step 2: Click SQL Server Network Configuration and Click Protocols for INSTANCENAME (i.e SQLEXPRESS)

















Step 3: Right Click TCP/IP and click Enabled

Step 4: Right-click TCP/IP and go to Properties, Click on  the IP Addresses tab and scroll down to the IP All section

Step 5: Clear the field TCP Dynamic Ports (i.e. empty/blank) and set TCP Port to 1433. Press Ok

















Step 6: Go to SQL Server Services and Right-click your SQL Server (INSTANCE NAME) and click Restart 













This will make the named instance listen on the default port. Now, you no need to write SQL Express in the Server Name.



Tuesday 4 May 2021

Create Azure Key Vault and Access in Asp.Net Core Application

Azure Key Vault is a cloud service that helps teams securely store connection string, passwords, etc, and access them. Today in the article we will learn how to create the Key Vault in Azure Portal and how to access secrets in our code. 


Step 1: Go to Azure Portal and search Key Vault and create it. 



 





Step 2: Enter Key Vault Name, Resource Group, Region, etc as mentioned the below screenshot.

Press Review + Create button. 


Step 3: It will check validation in the background and it will create a new Key Vault. 


Step 4: Click on Your Key Vault and go to Secrets and Press Generate/Import button.



 






Step 5: Create a new secret with any name. I have created a new secret dbpwd. Press Create button.



 







Till now, we have created the Key Vault in the Azure Portal and created the secret too. Let’s fetch this secret value in the Code. Let’s create a sample in Asp.Net Core API application and fetch the secret.


Create/Open Visual Studio Web/API application. In my example, I have created Asp.Net Core 3.1 Application.


 Step 1: Go to Program.cs, In line number 35, I have specified my Key Vault URL. You can specify your Key Vault URL. if you are not aware of your URL then go to Azure Portal and click on the Key Vault and see in the Overview Tab. You can find the URL.

 


Note: I have used default credentials in line 27. I have logged in to Visual studio with the same credentials as I'm logged in on the Azure portal.


Step 2: Go to Controller and fetch Key Vault Secret.













I have created a new endpoint, kV, and fetch the secret value.


Step 3: Run the API Project



 





You can see it fetched the secret value in the browser. This is all about this article. I hope you like it.





Wednesday 31 March 2021

Power BI – Get data from SQL Server Custom Query and display in Table, Matrix and Decomposition Tree

In this article, we will learn how to get data from SQL Server and display it in various visualizations 
Let's create some tables in our SQL database and insert some records. Here I'm going to create 2 new tables in SQL Server i.e. Country and State.


CREATE TABLE [dbo].[Country](
[CountryId] [int] NOT NULL,
[CountryName] [varchar](100) NOT NULL

CREATE TABLE [dbo].[State](
[StateId] [int] NOT NULL,
[CountryId] [int] NOT NULL,
[StateName] [varchar](50) NOT NULL,
)

INSERT [dbo].[Country] ([CountryId], [CountryName]) VALUES (1, N'India')
INSERT [dbo].[Country] ([CountryId], [CountryName]) VALUES (2, N'Srilanka')

INSERT [dbo].[State] ([StateId], [CountryId], [StateName]) VALUES (1, 1, N'Punjab')
INSERT [dbo].[State] ([StateId], [CountryId], [StateName]) VALUES (2, 1, N'Himachal')
INSERT [dbo].[State] ([StateId], [CountryId], [StateName]) VALUES (3, 2, N'Colombo')


Now our tables are ready and we have records. Let's write SQL Query to fetch the records.


SELECT c.CountryId,c.CountryName,st.StateId,st.StateName FROM country c 
INNER JOIN state st on c.CountryId=st.CountryId

Let's Open Power BI and fetch the records through a custom query.

Step 1: Click on Get data --> Go to SQL Server
























Step 2: Select your Server, Database and Go to Advance and write Custom Query



















Step 3: Enter your credentials. If you are using windows authentication for the database then click "Use my current credentials"
















Step 4: Once you press connect it will display all the records. You can press the Transform data button if you want to Add/Edit rows/columns. Otherwise, press the Load button.















You can go to Visualizations and can add Charts, Table, Matrix, etc. Here in this example, we will add a table. Double click on the Table icon.


Table Visualization


Step 1: Go to Visualizations and select Table.
















Step 2: Drag the Fields in Values in Visualizations. You can see the records on the left side.




















Step 3: You can format the data, By clicking on the format and change the format.






























Decomposition Tree


Step 1: Go to Visualizations and select Decomposition Tree.

Step 2: You can display the data in Tree. Drag the column in Analyze and Explain By








You can see the Country and State in Tree mode as mentioned above.



Matrix


Step 1: Go to Visualizations and select Matrix.
Step 2: Drag the Fields based on your requirement. In this example, I have displayed countries name and state count.
























You can't format the result as we did in the first example. You can change the font, color, background, Header, etc.

Also, you can publish the report to the Web then you can click the publish button and connect with your credentials and Publish to Power BI.






















This is all about this article. thank you.

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.




How to find the reason of HTTP Error 500.30 - ASP.NET Core app failed to start in Azure App Service

HTTP Error 500.30 - The ASP.NET Core app failed to start If your web app is throwing an error HTTP error 500.30 then how to find the root ca...