Skip to content

Instantly share code, notes, and snippets.

@EgorBo
Created July 13, 2017 23:20
Show Gist options
  • Save EgorBo/da39a750f3f52bb5cc20b11ac6d7739d to your computer and use it in GitHub Desktop.
Save EgorBo/da39a750f3f52bb5cc20b11ac6d7739d to your computer and use it in GitHub Desktop.
System.Net.Sockets.SocketException occurred
HResult=0x80004005
Message=An existing connection was forcibly closed by the remote host
Source=<Cannot evaluate the exception source>
StackTrace:
at System.Net.Sockets.Socket.DoBeginReceiveFrom(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint endPointSnapshot, SocketAddress socketAddress, OriginalAddressOverlappedAsyncResult asyncResult) in F:\CCCC\corefx\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs:line 3535
at System.Net.Sockets.Socket.BeginReceiveFrom(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint& remoteEP, AsyncCallback callback, Object state) in F:\CCCC\corefx\src\System.Net.Sockets\src\System\Net\Sockets\Socket.cs:line 3477
at System.Net.Sockets.UdpClient.BeginReceive(AsyncCallback requestCallback, Object state) in F:\CCCC\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UDPClient.cs:line 376
at System.Net.Sockets.UdpClient.<>c.<ReceiveAsync>b__56_0(AsyncCallback callback, Object state) in F:\CCCC\corefx\src\System.Net.Sockets\src\System\Net\Sockets\UDPClient.cs:line 652
at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl(Func`3 beginMethod, Func`2 endFunction, Action`1 endAction, Object state, TaskCreationOptions creationOptions)
Call stack:
> System.Net.Sockets.dll!System.Net.Sockets.Socket.DoBeginReceiveFrom(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint endPointSnapshot, System.Net.Internals.SocketAddress socketAddress, System.Net.Sockets.OriginalAddressOverlappedAsyncResult asyncResult) Line 3532 C#
System.Net.Sockets.dll!System.Net.Sockets.Socket.BeginReceiveFrom(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP, System.AsyncCallback callback, object state) Line 3477 C#
System.Net.Sockets.dll!System.Net.Sockets.UdpClient.BeginReceive(System.AsyncCallback requestCallback, object state) Line 376 C#
System.Net.Sockets.dll!System.Net.Sockets.UdpClient.ReceiveAsync.AnonymousMethod__56_0(System.AsyncCallback callback, object state) Line 652 C#
[External Code]
System.Net.Sockets.dll!System.Net.Sockets.UdpClient.ReceiveAsync() Line 651 C#
System.Data.SqlClient.dll!System.Data.SqlClient.SNI.SSRP.SendUDPRequest(string browserHostname, int port, byte[] requestPacket) Line 144 C#
System.Data.SqlClient.dll!System.Data.SqlClient.SNI.SSRP.GetPortByInstanceName(string browserHostName, string instanceName) Line 30 C#
System.Data.SqlClient.dll!System.Data.SqlClient.SNI.SNIProxy.CreateTcpHandle(System.Data.SqlClient.SNI.DataSource details, long timerExpire, object callbackObject, bool parallel) Line 393 C#
System.Data.SqlClient.dll!System.Data.SqlClient.SNI.SNIProxy.CreateConnectionHandle(object callbackObject, string fullServerName, bool ignoreSniOpenTimeout, long timerExpire, out byte[] instanceName, ref byte[] spnBuffer, bool flushCache, bool async, bool parallel, bool isIntegratedSecurity) Line 305 C#
System.Data.SqlClient.dll!System.Data.SqlClient.SNI.TdsParserStateObjectManaged.CreatePhysicalSNIHandle(string serverName, bool ignoreSniOpenTimeout, long timerExpire, out byte[] instanceName, ref byte[] spnBuffer, bool flushCache, bool async, bool parallel, bool isIntegratedSecurity) Line 55 C#
System.Data.SqlClient.dll!System.Data.SqlClient.TdsParser.Connect(System.Data.SqlClient.ServerInfo serverInfo, System.Data.SqlClient.SqlInternalConnectionTds connHandler, bool ignoreSniOpenTimeout, long timerExpire, bool encrypt, bool trustServerCert, bool integratedSecurity, bool withFailover) Line 324 C#
System.Data.SqlClient.dll!System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(System.Data.SqlClient.ServerInfo serverInfo, bool ignoreSniOpenTimeout, System.Data.ProviderBase.TimeoutTimer timeout, bool withFailover) Line 1573 C#
System.Data.SqlClient.dll!System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(System.Data.SqlClient.ServerInfo serverInfo, bool redirectedUserInstance, System.Data.SqlClient.SqlConnectionString connectionOptions, System.Data.ProviderBase.TimeoutTimer timeout) Line 1275 C#
System.Data.SqlClient.dll!System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(System.Data.ProviderBase.TimeoutTimer timeout, System.Data.SqlClient.SqlConnectionString connectionOptions, bool redirectedUserInstance) Line 1170 C#
System.Data.SqlClient.dll!System.Data.SqlClient.SqlInternalConnectionTds.SqlInternalConnectionTds(System.Data.ProviderBase.DbConnectionPoolIdentity identity, System.Data.SqlClient.SqlConnectionString connectionOptions, object providerInfo, bool redirectedUserInstance, System.Data.SqlClient.SqlConnectionString userConnectionOptions, System.Data.SqlClient.SessionData reconnectSessionData, bool applyTransientFaultHandling) Line 359 C#
System.Data.SqlClient.dll!System.Data.SqlClient.SqlConnectionFactory.CreateConnection(System.Data.Common.DbConnectionOptions options, System.Data.Common.DbConnectionPoolKey poolKey, object poolGroupProviderInfo, System.Data.ProviderBase.DbConnectionPool pool, System.Data.Common.DbConnection owningConnection, System.Data.Common.DbConnectionOptions userOptions) Line 135 C#
System.Data.SqlClient.dll!System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(System.Data.ProviderBase.DbConnectionPool pool, System.Data.Common.DbConnection owningObject, System.Data.Common.DbConnectionOptions options, System.Data.Common.DbConnectionPoolKey poolKey, System.Data.Common.DbConnectionOptions userOptions) Line 113 C#
System.Data.SqlClient.dll!System.Data.ProviderBase.DbConnectionPool.CreateObject(System.Data.Common.DbConnection owningObject, System.Data.Common.DbConnectionOptions userOptions, System.Data.ProviderBase.DbConnectionInternal oldConnection) Line 678 C#
System.Data.SqlClient.dll!System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(System.Data.Common.DbConnection owningObject, System.Data.Common.DbConnectionOptions userOptions, System.Data.ProviderBase.DbConnectionInternal oldConnection) Line 1606 C#
System.Data.SqlClient.dll!System.Data.ProviderBase.DbConnectionPool.TryGetConnection(System.Data.Common.DbConnection owningObject, uint waitForMultipleObjectsTimeout, bool allowCreate, bool onlyOneCheckConnection, System.Data.Common.DbConnectionOptions userOptions, out System.Data.ProviderBase.DbConnectionInternal connection) Line 1124 C#
System.Data.SqlClient.dll!System.Data.ProviderBase.DbConnectionPool.TryGetConnection(System.Data.Common.DbConnection owningObject, System.Threading.Tasks.TaskCompletionSource<System.Data.ProviderBase.DbConnectionInternal> retry, System.Data.Common.DbConnectionOptions userOptions, out System.Data.ProviderBase.DbConnectionInternal connection) Line 1044 C#
System.Data.SqlClient.dll!System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(System.Data.Common.DbConnection owningConnection, System.Threading.Tasks.TaskCompletionSource<System.Data.ProviderBase.DbConnectionInternal> retry, System.Data.Common.DbConnectionOptions userOptions, System.Data.ProviderBase.DbConnectionInternal oldConnection, out System.Data.ProviderBase.DbConnectionInternal connection) Line 289 C#
System.Data.SqlClient.dll!System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(System.Data.Common.DbConnection outerConnection, System.Data.ProviderBase.DbConnectionFactory connectionFactory, System.Threading.Tasks.TaskCompletionSource<System.Data.ProviderBase.DbConnectionInternal> retry, System.Data.Common.DbConnectionOptions userOptions) Line 691 C#
System.Data.SqlClient.dll!System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(System.Data.Common.DbConnection outerConnection, System.Data.ProviderBase.DbConnectionFactory connectionFactory, System.Threading.Tasks.TaskCompletionSource<System.Data.ProviderBase.DbConnectionInternal> retry, System.Data.Common.DbConnectionOptions userOptions) Line 69 C#
System.Data.SqlClient.dll!System.Data.SqlClient.SqlConnection.TryOpen(System.Threading.Tasks.TaskCompletionSource<System.Data.ProviderBase.DbConnectionInternal> retry) Line 1031 C#
System.Data.SqlClient.dll!System.Data.SqlClient.SqlConnection.Open() Line 598 C#
System.Data.SqlClient.Tests.dll!System.Data.SqlClient.Tests.SqlErrorCollectionTest.IsSynchronized_Success() Line 19 C#
[External Code]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment