When you try to start a web application in Windows Server 2008 R2, the following error appears. Getting this error when the application tries to connect to the database. However, I can run the application without any problems on another web server (Windows Server 2008 R2).
I see that there were a lot of messages in this error, but I could not get a solution for this.
Any help would be appreciated.
Error:
The connection to the server was successfully established, but then an error occurred during the registration process. (provider: TCP provider, error: 0 - semaphore timeout period has expired.)
Description . An unhandled exception occurred during the execution of the current web request. View the stack trace for more information about the error and its occurrence in the code.
Exception Details : System.Data.SqlClient.SqlException: A connection was successfully made to the server, but then an error occurred during the login process. (provider: TCP provider, error: 0 - semaphore timeout period has expired.)
Source Error :
An unhandled exception was thrown during the execution of the current web request. Information about the origin and location of the exception can be identified using the trace of the exception stack below.
Stack trace:
[SqlException (0x80131904): , . (: TCP, : 0 - .)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +89
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +207
System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error) +502
System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj) +153
System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket() +90
System.Data.SqlClient.TdsParserStateObject.ReadBuffer() +39
System.Data.SqlClient.TdsParserStateObject.ReadByte() +21
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +108
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +36
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +234
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +367
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +234
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +217
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +492
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +29
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +437
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +70
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +449
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +103
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +116
System.Data.SqlClient.SqlConnection.Open() +478
Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +123
Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText) +11
Providence.Internet.MyAccount.Utilities.ServiceAreaUtilities.GetServiceAreasFromDataBase() +168
Providence.Internet.MyAccount.Utilities.ServiceAreaUtilities.GetServiceAreas() +100
LabTestCatalog.Global.Application_Start(Object sender, EventArgs e) +45
[HttpException (0x80004005): A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.)]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +407
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +130
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +176
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +296
System.Web.HttpApplicationFactory.GetPipelineApplicationInstance(IntPtr appContext, HttpContext context) +54
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +237
[HttpException (0x80004005): A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +639
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +78
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +334