.NET:运行服务器时出现SocketException错误。

huangapple go评论77阅读模式
英文:

.NET: Running a server crashes with SocketException

问题

I'm running a .NET service in debug mode.
Once the program reaches the lines:

var host = CreateWebHostBuilder(args, null).Build();
if (Debugger.IsAttached || args.Contains("--debug") || Environment.OSVersion.Platform != PlatformID.Win32NT)
{
host.Run();
}

it throws a SocketException exception.

You can see it here:
.NET:运行服务器时出现SocketException错误。

I tried to search on the Internet but I didn't find anything that can help.
Any idea?

英文:

I'm running a .NET service in debug mode.
Once the program reaches the lines:

        var host = CreateWebHostBuilder(args, null).Build();
        if (Debugger.IsAttached || args.Contains("--debug") || Environment.OSVersion.Platform != PlatformID.Win32NT) 
        {
            host.Run();
        }

it throws a SocketException exception.

You can see it here:
.NET:运行服务器时出现SocketException错误。

I tried to search in the Internet but I didn't find anything that can help.
Any idea?

答案1

得分: 1

我找到了停止这个错误的方法。

转到"服务"并停止"World Wide Web发布服务"。

英文:

I found a way to stop this error.

Go to "Services" and stop the service "World Wide Web Publishing Service".

huangapple
  • 本文由 发表于 2023年5月25日 00:00:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/76325429.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定