Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows » Fix Error code 0x4 Session disconnected: Your session ended because of an error, if this keeps happening, contact your system administrator
  • delete Apps from Launchpad on Mac
    How to delete Apps from Launchpad on Mac Mac
  • powershell
    Set PowerShell Execution Policy via Windows Settings Windows
  • Webp.net resizeimage 5
    How to Improve Website Response Using Traffic Manager AWS/Azure/OpenShift
  • FEATURE IMAGE
    SSH into a VM created using Azure CLI or GUI Linux
  • Featured image 1
    How to Change User Account Type in Windows 10 Windows
  • sdgfdhx
    MDT Warning: Unable to set working directory, the application returned an unexpected code 2 Windows Server
  • Screenshot 2021 02 05 at 19.09.17
    How to install and update PowerShell version 7 on Windows and Linux Windows Server
  • Screenshot 2022 04 13 at 21.38.35
    Check Weather Conditions via Command Line on Windows, macOS, Linux and Web Linux

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

Posted on 07/08/202024/09/2024 Christian By Christian 4 Comments on Fix Error code 0x4 Session disconnected: Your session ended because of an error, if this keeps happening, contact your system administrator
Error code 0x4

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. 
Session disconnect error

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.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Pocket (Opens in new window) Pocket
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Windows Tags:Remote Desktop, RemoteConnection, Windows 10, Windows Server 2016

Post navigation

Previous Post: Error 0x204: Unable to Connect to Remote PC [Part 2]
Next Post: What is Cortona: How to disable Cortana via the registry or GPO

Related Posts

  • self signed sslcert
    Generate self-signed certificate and export in PFX format via PowerShell [Part 2] Windows
  • screenshot 2020 04 22 at 23.28.23
    Remove saved RDP connections in Windows Windows
  • Feature post
    Disable Bing Search in Windows: Quick Guide for Windows Windows
  • Uninstall SQL Server 2025
    Uninstall Microsoft SQL Server 2025 from Windows Oracle/MSSQL/MySQL
  • UEFI vs BIOS What's the Difference
    What are the Differences between UEFI and BIOS Windows
  • MBRGPT
    Run MBR and GPT conversion with the best GPT converter Windows

More Related Articles

self signed sslcert Generate self-signed certificate and export in PFX format via PowerShell [Part 2] Windows
screenshot 2020 04 22 at 23.28.23 Remove saved RDP connections in Windows Windows
Feature post Disable Bing Search in Windows: Quick Guide for Windows Windows
Uninstall SQL Server 2025 Uninstall Microsoft SQL Server 2025 from Windows Oracle/MSSQL/MySQL
UEFI vs BIOS What's the Difference What are the Differences between UEFI and BIOS Windows
MBRGPT Run MBR and GPT conversion with the best GPT converter Windows

Comments (4) on “Fix Error code 0x4 Session disconnected: Your session ended because of an error, if this keeps happening, contact your system administrator”

  1. Avatar photo alex says:
    20/10/2020 at 1:09 PM

    Hi there, I don’t have

    CurrentControlSet
    Control
    Terminal Server
    MaxOutstandingConnections

    under System/ using win server 12

    any help?

    Thanks

    Log in to Reply
    1. chris Christian says:
      20/10/2020 at 2:06 PM

      Hi Alex,

      As described in the article, you will have to create this key. Use the screenshot provided.

      Log in to Reply
  2. Avatar photo Anthony says:
    26/02/2021 at 9:06 PM

    I really wished this helped. I do not have a MaxOutstandingConnections. I added DWORD at Terminal Server, but that did not work.

    Log in to Reply
    1. chris Christian says:
      26/02/2021 at 11:29 PM

      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.

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • delete Apps from Launchpad on Mac
    How to delete Apps from Launchpad on Mac Mac
  • powershell
    Set PowerShell Execution Policy via Windows Settings Windows
  • Webp.net resizeimage 5
    How to Improve Website Response Using Traffic Manager AWS/Azure/OpenShift
  • FEATURE IMAGE
    SSH into a VM created using Azure CLI or GUI Linux
  • Featured image 1
    How to Change User Account Type in Windows 10 Windows
  • sdgfdhx
    MDT Warning: Unable to set working directory, the application returned an unexpected code 2 Windows Server
  • Screenshot 2021 02 05 at 19.09.17
    How to install and update PowerShell version 7 on Windows and Linux Windows Server
  • Screenshot 2022 04 13 at 21.38.35
    Check Weather Conditions via Command Line on Windows, macOS, Linux and Web Linux

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,836 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.