Federation Proxy Service(Microsoft.IdentityServer.ProxyService) crashed with object disposed exception

Suraj Singh 0 Reputation points
2025-11-07T12:45:34.2933333+00:00

**Service - **Microsoft.IdentityServer.ProxyService.exe(v10.0.17763.1728)

Server - Windows Server 2019 Standard

I am getting following error with federation proxy service(Microsoft.IdentityServer.ProxyService.exe)-

Application: Microsoft.IdentityServer.ProxyService.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ObjectDisposedException    at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean ByRef)    at System.StubHelpers.StubHelpers.SafeHandleAddRef(System.Runtime.InteropServices.SafeHandle, Boolean ByRef)    at Microsoft.Win32.Win32Native.SetEvent(Microsoft.Win32.SafeHandles.SafeWaitHandle)    at System.Threading.EventWaitHandle.Set()    at Microsoft.IdentityServer.ProxyService.DefaultClientRequestHandler.OnGetRequestStreamComplete(System.IAsyncResult)    at System.Net.LazyAsyncResult.Complete(IntPtr)    at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)    at System.Net.ContextAwareResult.Complete(IntPtr)    at System.Net.LazyAsyncResult.ProtectedInvokeCallback(System.Object, IntPtr)    at System.Net.HttpWebRequest.InvokeGetRequestStreamCallback()    at System.Net.HttpWebRequest.EndWriteHeaders_Part2()    at System.Net.HttpWebRequest.SetRequestContinue(System.Net.CoreResponseData)    at System.Net.Connection.ReadComplete(Int32, System.Net.WebExceptionStatus)    at System.Net.LazyAsyncResult.Complete(IntPtr)    at System.Net.LazyAsyncResult.ProtectedInvokeCallback(System.Object, IntPtr)    at System.Net.Security._SslStream.ProcessFrameBody(Int32, Byte[], Int32, Int32, System.Net.AsyncProtocolRequest)    at System.Net.Security._SslStream.ReadFrameCallback(System.Net.AsyncProtocolRequest)    at System.Net.AsyncProtocolRequest.CompleteRequest(Int32)    at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32)    at System.Net.FixedSizeReader.ReadCallback(System.IAsyncResult)    at System.Net.LazyAsyncResult.Complete(IntPtr)    at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)    at System.Net.ContextAwareResult.Complete(IntPtr)    at System.Net.LazyAsyncResult.ProtectedInvokeCallback(System.Object, IntPtr)    at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)    at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)

This issue is coming intermittently and when we restart the server it got resolved, we are getting only the above trace in event viewer which shows the service crashed with given error.
Could you please help me what can we do with to fix this?

Thanks,

Suraj

Developer technologies | .NET | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-11-07T12:46:25.49+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To troubleshoot the issue with the Federation Proxy Service (Microsoft.IdentityServer.ProxyService.exe) crashing with an object disposed exception, consider the following steps:

    1. Check for Updates: Ensure that your Windows Server 2019 is fully updated. Sometimes, crashes can be resolved by installing the latest updates or patches.
    2. Review Event Logs: Since you mentioned that the only trace in the event viewer is related to the crash, check for any other related events that might provide more context or details about what led to the crash. Look under Applications and Services Logs > Microsoft > Windows > Web Application Proxy > Admin for any additional logs.
    3. Monitor Resource Usage: Monitor the resource usage (CPU, memory) of the server to see if there are any spikes or unusual patterns leading up to the crash. High resource usage can sometimes lead to service instability.
    4. Check Configuration: Review the configuration settings for the Web Application Proxy and the AD FS server to ensure everything is set up correctly. Misconfigurations can lead to unexpected behavior.
    5. Increase Logging: If the issue persists, consider increasing the logging level for the Federation Proxy Service to capture more detailed information about what is happening before the crash occurs.
    6. Test in Isolation: If possible, test the service in a controlled environment to see if you can replicate the issue without other applications or services running.
    7. Consult Documentation: Refer to Microsoft documentation for any known issues or troubleshooting steps specific to the version of the Federation Proxy Service you are using.

    If the problem continues after these steps, you may want to reach out to Microsoft support for more in-depth assistance.


    References:


  2. Varsha Dundigalla(INFOSYS LIMITED) 3,725 Reputation points Microsoft External Staff
    2025-11-10T13:04:13.8466667+00:00

    Thank you for reaching out.

    The crash (ObjectDisposedException in Microsoft.IdentityServer.ProxyService.exe) points to a known reliability issue in the Web Application Proxy (WAP) service when handling SSL/TLS traffic. It’s most often seen on older Windows Server 2019 builds (like 10.0.17763.1728) when the proxy trust or HTTPS binding becomes unstable.

    Ideally, this should be fixed by applying the latest cumulative update. If you can’t update immediately, follow these steps to stabilize the service:

    1. rebuild proxy trust: Run on the WAP server in PowerShell (as Administrator):

    Install``` -WebApplicationProxy -FederationServiceName "adfs.yourdomain.com" ``

    This refreshes the trust relationship with AD FS and replaces stale certificates.

    2. verify certificates and bindings: Check that the Service Communications certificate matches the HTTPS binding:

    netsh http show sslcert
    

    Ensure the full certificate chain is installed and trusted on both servers. If the certificate was renewed, restart the Web Application Proxy service.

    3. align TLS configuration: Confirm both servers allow the same TLS versions and cipher suites.\ Review the SChannel event log for handshake or protocol errors.

    4. reduce impact if it happens again: Set automatic recovery for the Federation Proxy Service: services.msc → Federation Proxy → Recovery tab → Restart on first and second failure.

    Optional: create a LocalDump for crash analysis:

    reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\Microsoft.IdentityServer.ProxyService.exe" /v DumpType /t REG_DWORD /d 2 /f
    

    Dump location:

    C:\ProgramData\Microsoft\Windows\WER\ReportQueue\...
    

    5. plan maintenance: Update to the latest Windows Server 2019 cumulative update during your next maintenance window. Newer builds include fixes that prevent this crash permanently.

    references

    Please let us know if you require any further assistance, we’re happy to help.

    If you found this information useful, kindly mark this as "Accept Answer".


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.