WSL2 stops working after installing NetDetour
Symptoms
When starting WSL2, the following error is displayed:
The attempted operation is not supported for the type of object referenced.
Error code: Wsl/Service/0x8007273d
Cause
Unlike WSL 1.x, WSL2 creates multiple special "No LSP" Winsock entries during installation (wsl --install) under the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog
These entries instruct Windows not to load Winsock Layered Service Providers (LSP) into specific WSL2 components.
The problem occurs if these registry entries are removed, which can happen after resetting the Winsock configuration using commands such as netsh winsock reset.
When NetDetour uses LSP interception mode, missing WSL2 exclusions can prevent WSL2 from starting correctly.
Solution
Restore the missing WSL2 Winsock registry entries and reboot the system.
- Create and import a registry file:
- Create a text file named, for example, "restore-wsl2.reg".
- Paste the following contents into the file:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\07761DD8] "AppFullPath"="C:\\Program Files\\WSL\\wslg.exe" "PermittedLspCategories"=dword:80000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\1178A89F] "AppFullPath"="C:\\Program Files\\WSL\\wsl.exe" "PermittedLspCategories"=dword:80000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\17C2AA53] "AppFullPath"="C:\\Program Files\\WSL\\wslrelay.exe" "PermittedLspCategories"=dword:80000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\251585A4] "AppFullPath"="C:\\Program Files\\WSL\\wslhost.exe" "PermittedLspCategories"=dword:80000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\34DD6A3A] "AppFullPath"="C:\\Program Files\\WSL\\wslservice.exe" "PermittedLspCategories"=dword:80000000
- Double-click the .reg file and confirm the import. Administrative privileges are required.
- Restart the system:
- Reboot Windows after importing the registry entries.
- WSL2 should start normally again after the reboot.
Was this article helpful?