Windows 7 Websocket PlatformNotSupportedException [英] Windows 7 Websocket PlatformNotSupportedException

查看:151
本文介绍了Windows 7 Websocket PlatformNotSupportedException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Microsoft.Azure.Devices.Client NuGet包开发应用程序.一切在Windows 10上都运行良好,但是在Win7机器上进行测试时,我得到了这个聚合异常.

I am working on an application using the Microsoft.Azure.Devices.Client NuGet package. Everything is running great on Windows 10, but when testing on a Win7 machine I get this aggregate exception.

System.PlatformNotSupportedException:WebSocket协议不是 在该平台上受支持.

System.PlatformNotSupportedException: The WebSocket protocol is not supported on this platform.

四处搜寻,我发现有几个线程说Windows 7不支持此功能,并且有一些微软正在对此进行处理"类型的注释.

Searching around I have found a couple threads saying that this is not supported on Windows 7 and there were some "Microsoft's working on it" type comments.

https://github.com/5andr0/PogoLocationFeeder/issues/229

自2016年以来,我没有太多更新或解决方案.

I have not much for updates or solutions since 2016.

再进行一些搜索,就使我沿着Microsoft Web Platform Installer的方向前进 https://www.microsoft.com/web/downloads/platform.aspx

A little more searching lead me down the path of the Microsoft Web Platform Installer https://www.microsoft.com/web/downloads/platform.aspx

我们尝试安装"IIS 10.0 Express"和"Microsoft Azure PowerShell"仍然没有运气.

We tried to install "IIS 10.0 Express" and "Microsoft Azure PowerShell" with still no luck.

我们正在将W10机器上的所有Web平台也都安装在W7上...其中大多数似乎都具有一对一支持.

We are in the process of installing all Web Platforms that I have on my W10 machine on the W7 as well... most of which seemed to have 1-to-1 support.

任何人都可以评论W7是否已完成或已计划?

Can anyone comment on if this is done or planned for W7?

还是我真的需要在尝试使某些不可能的工作之前转向另一个方向吗?

Or do I really need to look in another direction before I try to make something impossible work?

除了Web服务安装之外,W7的安装程序中是否可能缺少软件包?

Maybe a missing package in my installer for W7 besides the Web Service Installs?

在此先感谢您的任何输入!!

Thanks in advance for any input here!!!

推荐答案

再搜索一点"之后所做的一切都走错了路.请停止这样做.

Everything you did after "A little more searching" is on the wrong path. Please stop doing that.

简单的答案是,您正在尝试使某些不可能的工作成为可能,因为Microsoft本身不愿意在Windows Vista和7上支持WebSockets(很久以前就已经不支持主流技术了).尝试使用其他替代方法,并避免浪费时间.

Short answer is, you are trying to make something impossible work, as Microsoft itself is reluctant to support WebSockets on Windows Vista and 7 (out of mainstream support a long time ago). Try to use other alternative ways, and stop wasting your time.

答案很长

  • Microsoft当前的假设是WebSockets始终要求Windows 8及更高版本.这是因为限制位于http.sys和HTTP API(这是一个操作系统组件)中.
  • Microsoft通过重用其对macOS和Linux的WebSockets支持的托管实现,确实具有无需更改操作系统级别即可在Windows Vista和7上支持.NET应用程序上的WebSockets的技术.他们尚未完成所有工作, https://github.com/dotnet/corefx/issues /9503
  • Microsoft's current assumption is always WebSockets requires Windows 8 and above. That's because the restriction lies in http.sys and HTTP API, which is an OS component.
  • Microsoft does have the technologies to support WebSockets on Windows Vista and 7 for .NET apps without OS level changes, by reusing their managed implementation of WebSockets support for macOS and Linux. They do not yet finish all the work, https://github.com/dotnet/corefx/issues/9503

随着GitHub问题状态(升级)显示,如果您愿意,可以继续工作并自助.我不会说这是不可能的,但是与转向可行的替代方案相比,这并不简单.

As the GitHub issue status (up-for-grabs) reveals, if you like you can continue the work and help yourself. I won't say it is impossible, but compared to moving to a feasible alternatives, it is no simpler.

当然,如果您有雄心壮志并且能够胜任艰巨的事情,那么您绝对应该加紧解决它,这不仅是针对您自己,也是针对像您这样的所有类似开发人员.

Of course, if you are ambitious and capable of tough things, you definitely should step up and resolve it, not only for yourself, but for all similar developers like you.

祝你好运.

[2018年3月27日更新]

[Updated on Mar 27, 2018]

https://github.com/dotnet/corefx/pull/26429

Microsoft最终在所有地方(UWP除外)启用托管实现.因此,如果您的应用程序面向.NET Core 2.1及更高版本,则它应该能够在Windows Vista/7上运行WebSockets.关于.NET Framework应用程序的故事还未知.

Microsoft finally enables the managed implementation everywhere (except UWP). So if your apps target .NET Core 2.1 and above, it should be able to run WebSockets on Windows Vista/7. The story about .NET Framework apps is unknown yet.

这篇关于Windows 7 Websocket PlatformNotSupportedException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆