Skip to content

System.Net.Sockets.SocketException (995) #51788

@Ervin304

Description

@Ervin304

When publishing a .NET API as a self-contained application for Win64 and hosting it on Windows Server 2016 as a Windows service, I encounter the following exception.

But when I host the application as framework-depended (only Release) it works ok. I am using .NET 6.0.

Category: Microsoft.AspNetCore.Server.Kestrel
EventId: 0
ConnectionId: 0HMUKF2V30C3N

Connection processing ended abnormally.

Exception: 
System.Net.Sockets.SocketException (995): The I/O operation has been aborted because of either a thread exit or an application request.
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketAwaitableEventArgs.<GetResult>g__ThrowSocketException|5_0(SocketError e)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketAwaitableEventArgs.GetResult(Int16 token)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.DoReceive()
   at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& )
   at System.IO.Pipelines.Pipe.GetReadAsyncResult()
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequestsAsync[TContext](IHttpApplication`1 application)

Could someone please assist me? I'm having trouble finding the problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions