Menu ▼



Posted By :
avatarmrkraju
Total Views : 306

Configuring SQL connection string in asp.net web.config

This example shows you how to configure SQL connection string in web.config file

Windows authentication connection string

<connectionStrings>
  <add name="myCon" connectionString="Initial Catalog=DbName;Data Source=ServerDetails;Integrated Security=SSPI;" providerName="System.Data.SqlClient"/>
</connectionStrings>

Sa user connection string

<connectionStrings>
  <add name="myCon" connectionString="Data Source=ServerDetails;user id=sa;password=xxxxxx;database=DbName;" providerName="System.Data.SqlClient"/>
</connectionStrings>






comments powered by Disqus


Search dotnetlearners.com