skip to Main Content

I am getting an error about not being able to run websockets

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>

Wierd thing is the machines on the face of it do not have 4.0 (nor 4.5) and are running 4.8, without hardcoding to a specific version (which is what they seem to be suggesting in the error) how do I make IIS realise it has a new enough version to do what it needs to do?

I have looked in the registry and can see the version shows correctly there so am a bit stumped and my Google-foo has let me down on this 🙂

registry setting

app-pool setting

2

Answers


  1. The Application Pool assigned to your application shows NET version in Application Pools folder in IIS Management Console:

    IIS Management Console: Server – Application Pools
    [1]: https://i.sstatic.net/rUhJP1tk.png

    Login or Signup to reply.
  2. You can try to clear the cache and restart IIS, this will clear the temporary ASP.NET files and restart IIS.

    iisreset /stop
    del /f /q %windir%Microsoft.NETFramework64v4.0.30319Temporary ASP.NET Files* 
    iisreset /start
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search