System.Data.SqlClient.SqlException: Login failed for user '<domain>\NSIWS01$' error when trying to connect
Posted on 2008-06-09
I have created a very simple web application with Visual Studio 2008. During development I created a database connection with a service account that my login has access to the database. But when I deploy the web application to a separate IIS server I get the following error message:
System.Data.SqlClient.SqlException: Login failed for user '<domain>\NSIWS01$'.
I know that that the connection is not being made and that it is trying to connect using the server name of the IIS server (NSIWS01). What I do not know is how to configure SQL Server 2005 so that I can use one service account that will connect to the database when it is deployed to a separate IIS server and in addition can be used when I am doing devleopment work on my workstation using Visual Studio 2008. IN the web.config file my connection string looks like the following:
<add name="DeviceIssuesConnectionString" connectionString="Data Source=NSSQL03-DEV;Initial Catalog=DeviceIssues;Integrated Security=True"
The datasource is the name of the server and the Catalog seems to be the name of the table within the database. The rest is not so sure about.
If anyone knows how to configure this so that I can get it working it would be greatly appreciated. I am new to both Visual Studio as well as SQL Server 2005.