C# 试图远程访问API
我试图远程访问我的api,但它没有连接 API使用.net内核,我使用iis express运行它 我打开了防火墙上的端口,允许从远程设备访问 通过以下步骤:C# 试图远程访问API,c#,asp.net,api,iis-express,C#,Asp.net,Api,Iis Express,我试图远程访问我的api,但它没有连接 API使用.net内核,我使用iis express运行它 我打开了防火墙上的端口,允许从远程设备访问 通过以下步骤: netsh http添加urlacl url=http://192.168.1.42:58938/ 用户=所有人 netsh advfirewall firewall add rule name=“IISExpressWeb”dir=in protocol=tcp localport=58938 profile=private remot
netsh http添加urlacl url=http://192.168.1.42:58938/ 用户=所有人
netsh advfirewall firewall add rule name=“IISExpressWeb”dir=in protocol=tcp localport=58938 profile=private remoteip=localsubnet action=allow
在applicationhost.config
中,我添加了
<bindings>
<binding protocol="http" bindingInformation="*:58938:localhost" />
<binding protocol="http" bindingInformation="*:58938:192.168.1.3" />
</bindings>
我希望可以从同一网络上的另一台设备访问我的API,但我没有您的
netsh
规则适用于192.168.1.42
,但您的
适用于192.168.1.3
。我将两者都更改为192.168.1.3
,但仍然没有达到任何效果
"iisSettings": {
"windowsAuthentication": false,
// "anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:58938",
"sslPort": 0
}
}