WCF: The connection was closed unexpectedly
Have you ever gotten the following error working with WCF services?
System.ServiceModel.CommunicationException: The underlying connection was closed: The connection was closed unexpectedly.
In your frustration of pulling your hair because the lack of more information you went to Google, pasted the error message and found this blog. Here I will tell you what to do.
Open up your web.config/app.config on the server side and add the following
A file called
traces.svclogwill be stored on your harddrive. This will contain the the error message that you're looking for. All you now need is the right tool to open it up. It is called
svctraceviewer.exeand usually resides in the folder
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin. If you don't have this folder or anything like it, you go download the Microsoft Windows SDK from here
Now you can open your log and look for the error that is thrown. There you will find a detailed stacktrace of what's wrong.