Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 19, 2012 08:42 AM by sukumarraju
Apr 15, 2012 05:57 AM|LINK
hi,i'm developing an app for wp7 which uses a service on my web app.the problem is ,it was working well till this morning i keep receiving the following error (from both actual host and local host) in my wp7 app:
There was no endpoint listening at
http://localhost:3840/locafile_ws_v1.0/Service.svc/Service.svc?wsdl that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.i
i refreshed the web reference in my app ,it didnt help.the thing that makes me wondering is that i didn't change anything in web app at all..
i searched and found couple of things,showing that mostly it's related to the "webconfig" file..
could anybody please help me out with correcting this webconfig :
<compilation debug="true" targetFramework="3.0">
<add assembly="System.Device, Version=18.104.22.168, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
<service name="Service" behaviorConfiguration="ServiceBehaviors">
<endpoint kind="udpDiscoveryEndpoint" />
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
Apr 15, 2012 11:43 PM|LINK
There was no endpoint listening at
http://localhost:3840/locafile_ws_v1.0/Service.svc/Service.svc?wsdl that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details
Make sure that the web service is running on the server.
Enable includeExceptionDetailInFaults="true" as explained at
Apr 17, 2012 03:19 AM|LINK
As sukumarraju suggested, you can turn on the "includeExceptionDetailsInFaults" option so that WCF service side will return full error information. And for testing, you can build a console client to call your WCF services so as to ensure the service itself
is working(isolate the issue to wp7 client).
Also, if you're running the WP7 app through emulator on local machine, you can also try using fiddler to capture the HTTP traffice between client and the service to see if there is any error information in the HTTP messages:
BTW, it seems you're using SOAP XML based WCF service(via basicHttpBinding) for the windows phone client. If there is no particular requirments on SOAP/XML, you can consider change your WCF service to RESTful style which is more convenient for windows phone
or other mobile clients to invoke. Here are some information on building REST style WCF service and consume it in WP7 client:
#An Introduction To RESTful Services With WCF
#WCF Web HTTP Programming Model Overview
#Consuming WCF 4.0 REST Service in Windows Phone 7
#WCF Rest Services for Windows Phone
Apr 18, 2012 01:17 AM|LINK
changing "includeExceptionDetailsInFaults" ended to an empty error..but after next try,it was working!i suspect there might be sth wrong with the web service..though it's workinjg now,i'm thinking how to handle this error?i mean where should i catch it?
Apr 18, 2012 02:14 AM|LINK
Thanks for reply arasx,
So if the problem occurs randomly without fixed pattern. Then, you can consider enablinng the WCF tracing to log potential error/exceptions during WCF processing time:
#Service Trace Viewer Tool (SvcTraceViewer.exe)
BTw, such kind of settings like "includeExceptionDetailsInFaults" and the tracing & logging is for debug time usage. for production deployment, you should always turn off them for performance purpose.
Apr 19, 2012 08:42 AM|LINK
Steven Cheng - MSFT
WCF tracing to log potential error/exceptions during WCF processing time:
Can you confirm whether tracing logs exceptiosn to log file? During recent WCF RESTFul service debugging processing enabling tracing hasn't logged any exceptions to log file.
EDIT: It is required to set 'switchValue' setting as explained at