小编Pin*_*ong的帖子

红隼无法启动

当指定要绑定的端口时,.UseKestrel()我得到下面列出的错误..但是如果我删除 kestrel 选项,如果我从浏览器检查 API,一切正常。

我尝试绑定到我的应用程序默认使用的端口而不选择netstat任何端口,并且我尝试检查以主动避免任何正在使用的端口。除了完全删除选项外,什么都不起作用。这不会在我的 Mac 或另一台 Windows 10 机器上复制。此设备是 Windows 10。

.UseKestrel(options =>
{
    options.Listen(IPAddress.Loopback, 50470);
    options.Listen(IPAddress.Any, 80);
})

: Microsoft.AspNetCore.Server.Kestrel[0]
Overriding address(es) 'http://localhost:50470/'. Binding to endpoints defined 
in UseKestrel() instead.
crit: Microsoft.AspNetCore.Server.Kestrel[0]
Unable to start Kestrel.
System.Net.Sockets.SocketException (10013): An attempt was made to access a 
socket in a way forbidden by its access permissions
at 
System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException
(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress 
socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport.
BindAsync() at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer. 
<>c__DisplayClass21_01.<<StartAsync>g__OnBind|0>d.MoveNext() …
Run Code Online (Sandbox Code Playgroud)

c# kestrel-http-server

8
推荐指数
3
解决办法
1万
查看次数

标签 统计

c# ×1

kestrel-http-server ×1