Sirwan Afifi
Sirwan Afifi

Reputation: 10824

SignalR: WebSockets is unsupported in the current application configuration

I'm using SignalR 2.1.2 in my project. Everything was OK, But today I saw that notifications don't work in my project. I tried to troubleshoot issue So I checked Windows Event Viewer and saw this error:

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>....

I have searched a lot about this issue. As you can see the error message tells us to set targetFramework, But I didn't get any result.
PS: I have this problem in both local version and published version.

Upvotes: 0

Views: 1974

Answers (1)

Sirwan Afifi
Sirwan Afifi

Reputation: 10824

After long time debugging I figured it out. I just forgot to establish the connection:

$.connection.hub.start()

});

Upvotes: 2

Related Questions