I tried creating handler for web socket but context.IsWebSocketRequest is returning always false and failed to working with IIS 8 Express on windows 7.
How can I enable module for websocket or any step I missing? I have VS 2012 application with IIS Express dynamic url.
Please help for the same.
In the Connections pane, select the server name to configure WebSocket for the server, or expand Sites and then select a site to configure WebSocket for the site, or expand a site and then select an application to configure WebSocket for the application.
Expand Web Server (IIS) in the Roles tree, then expand Web Server, and then expand Application Development. Select WebSocket Protocol, and then click Next. If no additional features are needed, click Next. Click Install.
Internet Information Services (IIS) 8.0 Express is a free, simple and self-contained version of IIS that is optimized for developers. IIS 8.0 Express makes it easy to use the most current version of IIS to develop and test websites in development tools like Visual Studio and WebMatrix.
The WebSocket protocol needs to be enabled in IIS 8 (see http://www.codeguru.com/csharp/csharp/programming-html5-web-sockets-in-asp.net-4.5.htm). Additionally, I'm not sure web sockets is supported on Windows 7. I've only seen that Windows 8 or Windows Server 2012 are required.
The short answer is, you can write applications against WebSockets in Windows 7 using IIS 8 Express, but you can't actually test them. It requires Windows 8 or Windows Server 2012.
From the IIS 8.0 Express ReadMe:
WebSocket Support
IIS 8.0 Express supports writing WebSocket applications. For more information, see the WebSocket protocol specification or the System.Net.WebSockets Namespace topic on Microsoft's MSDN website.
Windows Server 2012 and Windows 8 features that do not work on Down-Level Operating Systems
There are a few features which require architecture that is specific to Windows Server 2012 and Windows 8 Client that will not work down-level when you install IIS 8.0 Express on earlier operating systems:
Server Name Indication (SNI)
Central Certificate Store
WebSocket Functionality
Then, from the System.Net.WebSockets MSDN entry (emphasis mine):
Some of the classes in the System.Net.WebSockets namespace are supported on Windows 7, Windows Vista SP2, and Windows Server 2008. However, the only public implementations of client and server WebSockets are supported on Windows 8 and Windows Server 2012. The classes and class elements in the System.Net.WebSockets namespace that are supported on Windows 7, Windows Vista SP2, and Windows Server 2008 are abstract classes. This allows an application developer to inherit and extend these abstract classes with an actual implementation of client WebSockets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With