【问题标题】:why i can't use HttpListener in my Windows 10 computer? (System.PlatformNotSupportedException)为什么我不能在我的 Windows 10 计算机中使用 HttpListener? (System.PlatformNotSupportedException)
【发布时间】:2023-04-09 14:19:01
【问题描述】:

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 上使用它

【问题讨论】:

标签: c# windows


【解决方案1】:

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

它帮助了我!

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

我修好了。

sc config http start=demand
sc start http

【讨论】:

  • 哇。多么地晦涩难懂。你会认为这对于 Windows 10 中的重大变化来说已经足够基本了,以至于异常消息会说一些有意义的东西。
猜你喜欢
  • 1970-01-01
  • 2022-06-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-07-30
  • 2010-11-04
相关资源
最近更新 更多