Uma Shankar Patel

Uma Shankar Patel

  • NA
  • 410
  • 302.5k

A network-related or instance-specific error occurred

Nov 30 2013 1:55 AM
Hi,
I am using two connection strings in web.config for accessing data from two databases.
It is working fine on localhost but when I host it on IIS 7.5.On page that access both connection string ,Page work for 5-15 refresh and then error occured.
 
Quote:
Application information: 
Application domain: /LM/W3SVC/6/ROOT-1-130302610831717557 
Trust level: Full 
Application Virtual Path: / 
Application Path: C:\inetpub\wwwroot\intranetuat\ 
Machine name: OMXSRVDMSTEST 

Process information: 
Process ID: 12108 
Process name: w3wp.exe 
Account name: NT AUTHORITY\NETWORK SERVICE 

Exception information: 
Exception type: SqlException 
Exception message: 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Db.getListofPendingRequest(String mailid)
at MainMaster.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 


Request information:

all opened connection are closed properly.
I am unable to understand why this error occurred?
plz help....

Answers (1)