Skip to main content

How do you setup connection string with windows authentication.

Hi guys,

I know setting up a connection string is a simple deal as all of us do daily. Have anyone came across with issue of setting up connection with a local server and using windows authentication.  May yes and may be no. Whatever lets see what is the correct way of defining connection string for local database with windows authentication.


You will need to know following components as prerequisites ,

  • Data Source : Server name.
  • Initial Catalog : Database name.

Then setup the connection string as per below given format,

<add name="NothwindDb" connectionString="data source=<Your Data Source>;initial catalog=<Your Database Name>;persist security info=True;Integrated Security=SSPI;" providerName="System.Data.SqlClient"/>

Eg : <add name="NothwindDb" connectionString="data source=Home-ISURI\SQLEXPRESS;initial catalog=Backup2015Nov26;persist security info=True;Integrated Security=SSPI;" providerName="System.Data.SqlClient"/>




Comments

Popular posts from this blog

Radio Frequency Identification

What is rfid Radio Frequency Identification is rapidly improving and developing technology in today world. During the Second World War rfid technique use in very first time (1970).Whether you may don’t know this technology, but used in daily life. To understand bit of this just think about barcode system in super market. That is the simplest form we can see. Rfid technology is a means of gathering data by touching/seeing a data carrier. Most important feature of this is tracking objects and then uniquely identifying them. But no need direct sight line to recognize. This will give great new potential.

Things a QA engineer must know about JSON

JSON : J ava S cript O bject N otation JSON highly used in web services and rest applications. When a tester testing API he/she should have some knowledge to pass JSON objects and to understand received Jason response.  JSON is not a replacement of XML but it is very much useful in mobile applications. XML file size much larger than JSON and mobile applications prefer lightweight ways to communicate. In that case JSON is the most suitable one.