A network-related or instance-specific error occurred while establishing a
connection to SQL Server. Error Locating Server/Instance...
Moving a web project from test enviroment to the web server made this
error occur whenever tehre's an attempt to open a connection to the sql
server.
We can insert and read data from sql server management studio.
We're suspecting that the error is created from a bad connection string or
from the sql server using integrated security, but haven't been able to
confirm that.
the connection string.
<connectionStrings>
<add name="DSVUShort" connectionString="data
source=localhost\SQLEXPRESS;database=NS_Survey; integrated
security=true;multipleactiveresultsets=True;App=EntityFramework" />
</connectionStrings>
where it is used
SqlConnection Connection = new
SqlConnection(ConfigurationManager.ConnectionStrings["DSVUShort"].ToString());
Connection.Open() // pops the error
No comments:
Post a Comment