为什么我不能在我的Windows 10计算机中使用HttpListener? (System.PlatformNotSupportedException)

时间:2017-08-26 21:10:30

标签: c# windows

WCF : PlatformNotSupportedException when running Server Projects它对我不起作用......

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

代码:

HttpListener h = new HttpListener();

错误:

System.PlatformNotSupportedException: Operation is not supported on this platform

In System.Net.HttpListener..ctor()

我最近重新安装了Windows 10 1703,我不知道为什么会这样。

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

1 个答案:

答案 0 :(得分:2)

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

它帮助了我!

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

我修好了。

sc config http start=demand
sc start http
相关问题