为什么我不能在我的 Windows 10 计算机中使用 HttpListener?(System.PlatformNotSupportedException) [英] why i can't use HttpListener in my Windows 10 computer? (System.PlatformNotSupportedException)
本文介绍了为什么我不能在我的 Windows 10 计算机中使用 HttpListener?(System.PlatformNotSupportedException)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
WCF:运行服务器项目时的 PlatformNotSupportedException 它不适用于我...
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,我不知道为什么会这样.
I recently reinstalled Windows 10 1703,i don't know why it happened.
但我可以在 Windows 10 1511 上使用它
but i can use it on Windows 10 1511
推荐答案
http://www.mycsharp.de/wbb2/thread.php?threadid=92534
它帮助了我!
因为我的 HTTP 启动选项是 4.
because my HTTP start option is 4.
我修好了.
sc config http start=demand
sc start http
这篇关于为什么我不能在我的 Windows 10 计算机中使用 HttpListener?(System.PlatformNotSupportedException)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文