Skip to Content
Menu
This question has been flagged
2 Replies
277 Views

Can someone please help me configure IIS to allow the Odoo Real Time Connection to work? I have a yellow box around the screen and the message Real Time Connection Lost. I can not use the messages application at all when this message exists.

Avatar
Discard
Author
<system.webServer> <handlers> <add name="WebSocketHandler" path="*" verb="*" type="System.Web.Http.WebSocketHandler" resourceType="Unspecified" requireAccess="Script" /> </handlers> <webSocket enabled="true" /> </system.webServer>

This does not work. I now get a 500 error for "The requested page cannot be accessed because the related configuration data for the page is invalid." And it does not understand what "<handlers>" is. It says " This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false"." What should I do with this?

Best Answer

It sounds like the Odoo Real Time Connection is not working due to WebSocket issues, which is likely caused by IIS (Internet Information Services) not properly handling WebSocket connections. Here’s how you can configure IIS to allow WebSockets for Odoo:

Step-by-Step IIS Configuration for Odoo Real Time Connection

  1. Enable WebSockets in IIS
    • Open Server Manager → Click on Manage → Select Add Roles and Features.
    • Go to Server Roles → Expand Web Server (IIS) → Expand Application Development.
    • Check WebSocket Protocol and install it if not already enabled.
    • Restart IIS after the installation.
  2. Configure WebSocket Module in IIS
    • Open IIS Manager.
    • Select your site (the one hosting Odoo).
    • Click on Modules → Ensure that the WebSocket Module is installed and enabled.
  3. Modify Request Filtering
    • In IIS Manager, go to your Odoo site.
    • Open Request Filtering → Click on Edit Feature Settings.
    • Uncheck Allow double escaping if checked.
  4. Allow WebSockets in Web.config
    • Locate your Odoo site’s Web.config file (typically under C:\inetpub\wwwroot\Odoo or wherever your Odoo instance is installed).
    • Add the following inside the <system.webServer> section:

      <system.webServer> <handlers> <add name="WebSocketHandler" path="*" verb="*" type="System.Web.Http.WebSocketHandler" resourceType="Unspecified" requireAccess="Script" /> </handlers> <webSocket enabled="true" /> </system.webServer>

  5. Check IIS Application Pool Settings
    • Open IIS Manager.
    • Go to Application Pools.
    • Select your Odoo application pool → Click on Advanced Settings.
    • Under Process Model, set Idle Time-out (minutes) to 0 (prevents auto shutdown).
  6. Restart IIS
    • Open Command Prompt as Administrator.
    • Run:

      iisreset

Verify the Fix

  • Open Odoo in your browser and check if the yellow "Real Time Connection Lost" warning disappears.
  • Test the Messaging App and other real-time features to confirm WebSockets are working.

If the issue persists, check your firewall settings and ensure that WebSockets are allowed on port 8069 (or your Odoo instance’s port). Let me know if you need further assistance! 🚀

or Check Documentation: https://www.odoo.com/documentation/master/administration/on_premise/packages.html

Avatar
Discard
Best Answer

https://www.odoo.com/documentation/master/administration/on_premise/packages.html

(You will also get better performance running a Virtual Machine within a Windows host).

Avatar
Discard