Fix Error code 0x4 Session disconnected: Your session ended because of an error, if this keeps happening, contact your system administrator

Remote Desktop Protocol (RDP) is a proprietary protocol developed by Microsoft. It provides a user with a graphical interface to connect to another computer over a network connection. In this article, we will discuss how to “Fix Error code 0x4 Session disconnected: Your session ended because of an error, if this keeps happening, contact your system administrator’. You will receive the following error “Your session has ended because of an error. Error Code 0x4″ whenever your Mac goes to sleep”. Please see how to fix this network connection does not exist.
Below are some troubleshooting guides relating to RDP  “We could not connect to the remote PC with error code 0x204 and make sure the PC is turned on and connected to the network–Part 1“.
Since this is actually not a problem, please use the following steps below to mitigate this issue.
Also, see the fix to “we could not connect to the remote PC with error code 0x204 and make sure the PC is turned on and connected to the network–Part 2“. Here is How to create a contact in Active Directory.
Solutions to “Error code 0x4 Session disconnected: Session ended due to error”
Kindly refer to the steps below to resolve these issues.
- Launch a new RDP connection or
- Simply increase the maximum outstanding connections limit on the windows client machine. The following DWORD registry key controls this value.
See the following hyperlinks for what is Registry Editor and how to access the registry hives and how to search through Windows Registry.
Launch the Windows registry, navigate through hives to troubleshoot the 0x4 Session Disconnection Error, as described below. Error code 0x4 Session disconnected: Session ended due to error
Computer\HKEY_LOCAL_MACHINE
- SYSTEM
- CurrentControlSet
- Control
- Terminal Server
- MaxOutstandingConnections

Now create the DWORD key if your machine doesn't have it.
- Set it to 10,000 (hex value)
I hope you found this blog post helpful. Please let me know in the comment session if you have any questions.

Hi there, I don’t have
CurrentControlSet
Control
Terminal Server
MaxOutstandingConnections
under System/ using win server 12
any help?
Thanks
Hi Alex,
As described in the article, you will have to create this key. Use the screenshot provided.
I really wished this helped. I do not have a MaxOutstandingConnections. I added DWORD at Terminal Server, but that did not work.
Hi, Please you will have to create it “MaxOutstandingConnections”. After creation, please set the DWORD value to 10,000. A reboot of the remote machine is recommended afterward.