为什么我无法在 Windows 10 计算机中使用 HttpListener? (系统.PlatformNotSupportedException)

2023-12-07

WCF:运行服务器项目时出现 PlatformNotSupportedException这对我不起作用...

Console.WriteLine(System.Net.HttpListener.IsSupported); // false

Code:

HttpListener h = new HttpListener();

Error:

System.PlatformNotSupportedException: Operation is not supported on this platform

In System.Net.HttpListener..ctor()

我最近重新安装了Windows 10 1703,我不知道为什么会发生这种情况。

但我可以在 Windows 10 1511 上使用它


http://www.mycsharp.de/wbb2/thread.php?threadid=92534

它帮助了我!

因为我的 HTTP 启动选项是 4。

我修好了它。

sc config http start=demand
sc start http
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

为什么我无法在 Windows 10 计算机中使用 HttpListener? (系统.PlatformNotSupportedException) 的相关文章

随机推荐