Reputation: 404
At the moment I have my connectionstrings in plain text in my code for development purposes. Everything works lik a charm. However if I move my connection strings to a remote config file the following sql error appears :
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
I tried printing the connectionstring and it was identical to the one I had in plain text.
ConnString = "Initial Catalog=###;Persist Security Info=True;User ID=###;Password=###";
ConnFromFile = WebConfigurationManager.AppSettings["ConnString"];
Log.Message(ConnString ==ConnFromFile )
This resulted in True.
Upvotes: 0
Views: 524
Reputation: 409
=>Sql configuration manager,check tcp/IP, named pipeline is enabled,and VIA is disable
Upvotes: 1