Friday, January 09, 2009 8:31 AM
I have a problem with my Silverlight application, where I get NotFound returned on calls to my web service. I run the service on my local IIS install (Vista / IIS7) and looking at the logs it is "correct" in that IIS return a 404 everytime a POST is made to the service, though if it is a GET (browsing to the service) all is well.
To make matters even more odd, I developed this under a different website initially, to simplify some of the potential problems and here it worked. The initial test web host is under the same website in IIS.
Also it does not seem to matter if I configure the binding in code or use the clientconfig, I get the same problem.
Can anyone tell me where I am going wrong here? I am tearing my hair out and everything I read to try does not help.
Friday, January 09, 2009 8:49 AM
Your best bet to use something like Fiddler or web developer helper to see exactly what is going on. Maybe it is looking for a cross domain policy or there is a typo in the service url.
Friday, January 09, 2009 12:13 PM
Hi, I had previously tried web dev helper and have just tried fiddler. However neither seem to show the web service calls from my silverlight application. The only way I can see what it is requesting is with the IIS logs. From there I can see that no request is made for a clientaccesspolicy.xml, etc. It goes from a successful GET for the xap to a failed (404) POST for the service.
I do, if it were looking for it, have the following clientaccesspolicy.xml file:
<?xml version="1.0" encoding="utf-8"?>
<resource path="/" include-subpaths="true"/>
Also, I have just been looking at my IIS logs, comparing the successful attempt from one site and the failed from another, and have just noticed. The failing site is configured for forms authentication (The Silverlight is a reporting control of a larger application), and I wondered if this could cause the problem. My web.config puts the service in a folder that anyone can access.
Friday, January 09, 2009 12:22 PM
Just a quick note, I have changed the site to require no authentication and tested - same error.
Friday, January 09, 2009 12:25 PMIf you do not see a request for the clientaccesspolicy.xml then it is not needed. This leaves us with a problem with the service. What happens if you try and open the service in the browser? I am thinking there is an error with the service
Thursday, January 15, 2009 3:51 AM
Sorry for the delayed reply. If i open the service in the browser I get the normal IIS response and the logs show a successful GET for the service.
I also expected there was an error in the service, so i have put error handling through out to log to both a text file and windows eventlog. Nothing in either.
Thursday, January 15, 2009 6:37 AM
If this is a wcf service make sure you are using basichttpbinding. What are you returning from the service?
Tuesday, January 20, 2009 4:14 AM
Yep, it is configured for basicHttpBinding. The return from the functions is a string of XML (because my objects were causing errors).
I have the same service working in a simplier web application, and it is fine there. But when I move it to the full website I get these errors.
There are a couple of bits that i thought may cause errors in the live site:
- It uses forms authentication, though the service is configured to allow everyone.
- It is under SSL, however I have configured the service to use transport-level security.
Wednesday, January 21, 2009 8:52 PM
Try this thread
Open the .xap with winrar - change the servicereferences.clientconfig - save the xap
Thursday, February 19, 2009 6:56 AM
Finally found the problem, it was a url issue between the client and server. I just didn't see the wood through the trees.
Thanks for your help everyone
Thursday, February 26, 2009 11:22 AM
I able to bring up a web service on my local machine - http://localhost:49302/ProductService.svc
However, if ProductService.svc is placed on the Web Server, within wwwroot, http://www.run4power.myphizzpop.com/ProductService.svc
- An error to the effect of "resource can not be found" is received.
On the other hand, I have clientaccesspolicy.xml in wwwroot, and I am able to browse -
I don't believe I have access to IIS on the web server (Applied Innovations is the host).
Is it possible that ProductService.svc needs to be modified, in order to run on the web server.
Best regards, Rob