Connection not working for MSSQL server 2008 (Error locating server/instance)
I am new to asp.net mvc3 and trying to get a connection going to a MSSQL server 2008 instance which is not express. Anyway, in the vi开发者_如何学JAVAsual studio express I have a connection to the remote database setup already which i can browse from my local machine, however when i do the deployment to the remote machine I get the error :
provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified
My local ide connection properties which works look like this :
Data Source=10.14.144.74;Initial Catalog=iLog;Persist Security Info=True;User ID=myid;Password=***********
.NET Framework Data Provider for SQL Server
The connection string that i am deploying in the web.config to the server is :
<add name="iLog"
connectionString="server=10.14.44.74;uid=myid;pwd=***********;database=iLog"
providerName="System.Data.SqlClient" />
I have tried using ip\MSSQL which i think is the instance name, I have also tried the different formats for User Name and Password in the connection string but i always get the same error. The only thing i have seen is the reference to sqlbrowser or something like that? Other than that I am completely stumped on what to do next.
Any help would be greatly appreciated.
You should check if the IP is correct, if yes, then this should work.
<add name="iLog" connectionString="Data Source=10.14.44.74;User ID=myid;Password=***********;Initial Cataglog=iLog" providerName="System.Data.SqlClient" />
Did you try connectionstrings.com?
try giving [user=myid] instead of uid=myid and see if it works
精彩评论