Exception message: WebSockets are not supported in the current application configuration

I just recently upgraded to Windows 2012 standard 64bit server so I can use websockets.

I added a role / function via Server Manager.

I noticed a message in my Windows log:

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 18/11/2014 11:51:12 
Event time (UTC): 18/11/2014 11:51:12 
Event ID: 5261ba8b0e5343289d5fc8618adb8117 
Event sequence: 113 
Event occurrence: 1 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/1/ROOT-1-130607850516111864 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: D:\Release\WebRoot\ 
    Machine name: DSVR019492 

Process information: 
    Process ID: 660 
    Process name: w3wp.exe 
    Account name: IIS APPPOOL\.NET v4.5 

Exception information: 
    Exception type: InvalidOperationException 
    Exception message: WebSockets is unsupported in the current application configuration. To enable this, set the following configuration switch in Web.config:
<system.web>
  <httpRuntime targetFramework="4.5" />
</system.web>

      

So I tried to add to the place where the message was told to me. But I am getting this warning:

The 'targetFramework' attribute is not allowed.

 <system.web>
        <httpRuntime targetFramework="4.5.1" />

      

But before I added this, I noticed that I had this:

  <system.web>
    <compilation debug="true" targetFramework="4.5.1">

      

Isn't it the same thing? If that's why I am getting this warning.

I look forward to being educated ...

+3


source to share


1 answer


Have you included the module? http://danielhindrikes.se/windows-8/enable-websocket-protocol-in-iis/

enter image description here

Enable WebSocket Protocol on Windows Server 2012

  • Open "Server Manager"
  • Click "Manage" in the right corner.
  • Click "Add Roles and Features"
  • Go to "Installation Type in the Wizard"
  • Select "Install based on roles or features and click" Next "
  • Go to the "Server Roles" section
  • Expand "Web Server (IIS)"
  • Expand "Web Server"
  • Expand Application Development
  • Check the WebSocket protocol and click Next
  • Click Install


In my Web.config I have:

  <system.web>
    <compilation debug="true" targetFramework="4.5.1" />
    <httpRuntime targetFramework="4.5.1" />
  </system.web>

      

So it could be related to this? Unrecognized attribute 'targetFramework'. Please note that attribute names are case sensitive or that you are editing VS2010

+6


source







All Articles