Changing database connection string form SQL to Windows
I want to change current implementaion of SQL connection string on my website with Windows connection string but I don't know how to accomplish this.
I changed the connection string to below:
Data Source=SERVER;Initial Catalog=DATABASENAME;Integrated Security=SSPI;
With this, the website start giving service unavailable error. I know there are a few settings which should be done on IIS level as well for this but I don't understand what changes to make. A few online articles suggest that I should change
Please suggest how I can proceed with this change.
I think the question is to change the connection string from SQL to windows authentication in which case no username/password is needed.
The example connection string you posted looks fine. Are you sure the value for data source is correct (this should contain the name of your SQL server instance) ?
It may also be helpful to temporarely enable detailed error messages on your website, to better pinpoint the source of the error:
Changing database connection string form SQL to Windows
I want to change current implementaion of SQL connection string on my website with Windows connection string but I don't know how to accomplish this.
I changed the connection string to below: Data Source=SERVER;Initial Catalog=DATABASENAME;Integrated Security=SSPI;
With this, the website start giving service unavailable error. I know there are a few settings which should be done on IIS level as well for this but I don't understand what changes to make. A few online articles suggest that I should change
Please suggest how I can proceed with this change.
Hi Smriti
You need a login and password also, something like that:
Alex
I think the question is to change the connection string from SQL to windows authentication in which case no username/password is needed.
The example connection string you posted looks fine. Are you sure the value for data source is correct (this should contain the name of your SQL server instance) ?
It may also be helpful to temporarely enable detailed error messages on your website, to better pinpoint the source of the error:
https://stackoverflow.com/questions/11665322/how-to-set-web-config-file-to-show-full-error-message
Hi Smriti,
Can you please update your connection string as follows and try:
Good luck :)
is working on a reply...