Solved

WCF EXCEPTION

Posted on 2011-09-28
5
284 Views
Last Modified: 2012-05-12
When i called WCF service i got this error

The underlying connection was closed: The connection was closed unexpectedly

any help ????
0
Comment
Question by:AhmedHindy
5 Comments
 
LVL 23

Expert Comment

by:wdosanjos
ID: 36717674
It should be related to a database transaction timing out on the service.  I believe the default timeout value is 60 secs.
0
 
LVL 18

Expert Comment

by:Anil Golamari
ID: 36718273
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.
0
 
LVL 8

Expert Comment

by:jagrut_patel
ID: 36812800
It is a very generic error message. Try to debug your WCF service to derive more information. You can even temporarily enable "IncludeExceptionDetailsInFault" 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.
0
 
LVL 4

Accepted Solution

by:
AhmedHindy earned 0 total points
ID: 36813749
i had known the source of the error by enabling debugging and tracing in wcf service


in the web.config of the servicename:
Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development.

<compilation debug="true" strict="false" explicit="true">


0
 
LVL 4

Author Closing Comment

by:AhmedHindy
ID: 36908384
it worked
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now