英文:
.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.
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.
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".
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论