How to move web.config connectionStrings in a separate web.config file ?

In this post you will learn how to create a separate web.config file in ASP.NET or MVC to store development and production versions of connection strings.

Step 1. Create a PrivateConn.config file on root with below code

  <add name="DataConn1" connectionString="Data Source=server;Initial Catalog=database1;Persist Security Info=True;User ID=sa;Password=xxxx;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
  <add name="DataConn2" connectionString="Data Source=server;Initial Catalog=database2;Persist Security Info=True;User ID=sa;Password=xxxx;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />

Step 2. Open main web.config file (on application root) and then define new config file path, as given below

<?xml version="1.0" encoding="utf-8"?>

How to move web.config appSettings in a separate web.config file ?

In this post you will learn how to create a separate web.config file in ASP.NET or MVC to store development and production versions of application settings.

Step 1. Create a Private.config file on root with below code

  <add key="data1" value="value1"/>
  <add key="data2" value="value2"/>

Step 2. Open main web.config file (on application root) and then define file path with appSettings start tag, as given below

<?xml version="1.0" encoding="utf-8"?>
  ....other codes
  <appSettings file="PrivateSettings.config">
    <add key="webpages:Version" value=""/>
    <add key="webpages:Enabled" value="false"/>
    <add key="ClientValidationEnabled" value="true"/>
    <add key="UnobtrusiveJavaScriptEnabled" value="true"/>

Can test automation replace manual testing?

Short and simple answer, NO. It cannot. Let's talk why, we cannot replace manual testing.

Consider, a form screen showing a extra textbox or a wrong color in any control or a wrong modal, but the entire functionality works fine otherwise. Such things would easily be missed if you have a 100% automated test cases with 100% test coverage, because automated testing looks more at what is expected and less at what is not expected.

We see a ton of software's around for test and its automation, and they are divided into different categories:

1. Test Management Tools - Azure DevOps, PractiTest, TET (Test Environment Toolkit), TETware etc
2. Functional Testing Tools - Selenium, Soapui etc
3. Load Testing Tools - Azure DevOps, Jmeter, FunkLoad, ANTS etc

Any tool you select has list of features and they power up software testers or testing. Manual testing will stay and advocate manual testers to develop skills like scripting which can make them more efficient and do a better job.

Both manual …

Reading NS records in C# using ARSoft packages

In this post you will learn about reading NS records in C# using ARSoft packages. This package is handy to read domain NS records. Here's a sample code which will help:

using System;
using System.Linq;
using ARSoft.Tools.Net;
using ARSoft.Tools.Net.Dns;
namespace ConsoleApp14
    class Program
        static void Main(string[] args)
            var dnsMessage = DnsClient.Default.Resolve(DomainName.Parse(""), RecordType.Ns);
            var nsrecords = dnsMessage.AnswerRecords.OfType<NsRecord>();
            foreach (var record in nsrecords)

Here's the output of the above code:

Hope this helps.

Customizing "Edit Top 200 Rows" in SQL Server Management Studio

It is a very common requirement that, sometimes we want to change the edit top 200 rows query. This is very much possible and easy in SQL Server Management Studio.
Right click on table and select "Edit Top 200 Rows"Press "Ctrl + 3" on rows in edit mode windowNow you can see the query which returned 200 rows allowing you to editOn this query window, right click to execute the query on window itself And voila, you have records based on your query to edit those on window :)

Hope this helps.

Create virtual machine using PowerShell command

Just run this PowerShell script to create virtual machine, you can change setting in order to have other operating system and pricing.

Hope this helps.

Free SSL Certificate for your website - from CloudFlare

In this video post you will learn about free SSL certificate and its installation. This free SSL certificate is from CloudFlare but due to lack of installation guidelines and step by step we as a developer ignores this. Using CloudFlare SSL is a great advantage because you get other service for free too. Off-course, with paid plans you will get all the gems. Remember this never affects your SEO ranks.

Now, let's begin talking about this free SSL certificate. CloudFlare SSL sits between your user and your hosting server. So any potential attack is taken care by CloudFlare before they reach your server. So your user will see SSL certificate till their request reaches CloudFlare server.

If you already have a website running without SSL and you want to get this, then i would recommend to take a screenshot of your domain NS, CNAME, A, AAAA, MX records before you try this.

If you don't want any downtime, off-course, then steps would be like: whatever settings you have on your domai…

Popular posts from this blog