SQL Server connection problem
I have SQL Server 2005 running on a remote server.
It works fine for my application, how ever if I change the connection string in web.config
file and redirect it to another SQL Server, then I get an error "could not connect to remote server".
I have added the detail of the error type, i get those error.Using sqlserver object explorer i can connect to the server and see the database. but using the same username and password in my webconfiguration file i cannot connect and got the above mentioned error.
I get also this error offending URL. What could be the possible way to figure out? error is offending url and unknown server authentication
http://myweb.com/login
Source: Sy开发者_Go百科stem.Web
Message: Unable to connect to SQL Server session database.
Stack trace: at System.Web.SessionState.SqlSessionStateStore.ThrowSqlConnectionException(SqlConnection conn, Exception e)
at System.Web.SessionState.SqlSessionStateStore.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo)
at System.Web.SessionState.SqlSessionStateStore.GetConnection(String id, Boolean& usePooling)
at System.Web.SessionState.SqlSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem)
at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
There are several things that you can check:
- Check that the SQL Server on the romete machine is running
- Check if there is a firewall on the remote machine that is blocking the 1433 TCP port and the 1434 UDP port
- Check if TCP/IP remote connection are enabled inside SQL connection protocls
- Set explicitly the TCP port 1433 foreach ip address on the TCP/IP on the SQL network configuration
- Check if sql server browser is running on the remote machine
Hope this helps.
精彩评论