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. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Description: An unhandled exception occurred during the execution of the current web request. Please review the st-ack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: 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. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Source Error:
Code
Line 19: public virtual ShoppingCart.Cart SCart {
Code
Line 20: get {
Code
Line 21: return ((ShoppingCart.Cart)(this.GetPropertyValue("SCart")));
Code
Line 22: }
Code
Line 23: set {
Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\97695b63\1bcd02a6\App_Code.h2ynpg5_.6.cs Line: 21
This error was due to sql connection not getting opened. Check your hosting server whether it allows you to connect sql server. May be it is blocked for security reason.
SHIVAM SINGH12 reputationPosted Sep 13, 2014, 2:53 AM EDT
0
Hi Pradeep
connection string correct. actually this project is e-commerce project. so i'm use shopping cart
which create virtual database on server automatically. it's run on local sever properly but error occur on server. so if you have a solution for fix then please tell me....
Pradeep ShetRank #595 · 4K reputationPosted Sep 13, 2014, 12:26 AM EDT
This error was due to sql connection not getting opened. Check your hosting server whether it allows you to connect sql server. May be it is blocked for security reason.
SHIVAM SINGH12 reputationPosted Sep 13, 2014, 2:53 AM EDT