AhmedHindy
asked on
WCF EXCEPTION
When i called WCF service i got this error
The underlying connection was closed: The connection was closed unexpectedly
any help ????
The underlying connection was closed: The connection was closed unexpectedly
any help ????
It should be related to a database transaction timing out on the service. I believe the default timeout value is 60 secs.
Try below steps to see whether that may help you with the issue;
1) You'll need to enable tracing (http://msdn2.microsoft.com/en-us/library/ms733025.aspx) at the server side to figure out what caused it to close the connection.
2) You can see the server traces with the SvcTraceViewer.exe tool (http://msdn2.microsoft.com/en-us/library/ms732023.aspx), which is installed with the SDK (http://www.microsoft.com/downloads/details.aspx?FamilyID=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en).
There should be an exception in the server traces which tell what the problem was.
1) You'll need to enable tracing (http://msdn2.microsoft.com/en-us/library/ms733025.aspx) at the server side to figure out what caused it to close the connection.
2) You can see the server traces with the SvcTraceViewer.exe tool (http://msdn2.microsoft.com/en-us/library/ms732023.aspx), which is installed with the SDK (http://www.microsoft.com/downloads/details.aspx?FamilyID=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en).
There should be an exception in the server traces which tell what the problem was.
It is a very generic error message. Try to debug your WCF service to derive more information. You can even temporarily enable "IncludeExceptionDetailsIn Fault" service behavior setting to get exact server side exception, if any.
If you are using a stateful service (i.e. PerSession) then you can check whether any service call made before the call on which you get such error has failed or not. Such earlier failed call to an operation could have closed the underlying client side communication channel and thus preventing subsequent calls.
If you are using a stateful service (i.e. PerSession) then you can check whether any service call made before the call on which you get such error has failed or not. Such earlier failed call to an operation could have closed the underlying client side communication channel and thus preventing subsequent calls.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
it worked