Last post Jun 29, 2009 06:00 PM by mule
Jun 25, 2009 04:27 PM|mule|LINK
I've written a REST service (collection template from the starter kit) and deployed it successfully to a WinXP machine.
However, when I deploy the same app on a Win2003 Server, it does not work correctly. Specifically, I get 404 errors when accessing URLS such as
http://localhost/myrestservice/Service.svc/<ID KNOWN TO EXIST>.
I've checked to see that the HTTP verbs (GET, POST, PUT, DELETE) are all correctly associated with the .svc extension in IIS.
I've seen this same problem on server win2003 servers. I'm sure there is something about the IIS configuration that I'm missing. But, I cannot think of what it is.
Thanks, in advance, for any ideas.
WCF REST Starter Kit
Jun 26, 2009 12:59 PM|ronjacobs|LINK
Can you run a debugger to see if it is actually hitting your service code?
Jun 26, 2009 05:30 PM|mule|LINK
Thanks for the suggestion, Ron.
I installed the remote debugger on that 2003 Server in the hopes of avoiding a full-on install of Visual Studio and my code over there. My belief is that if I remotely attach to the inetinfo process on that machine that I would see something happen if my
service code is getting hit. Is that correct?
As you may be able to tell from my question, I've not worked with the remote debugger before. If it sounds like I might be doing it wrong, please let me know and I'll install VS (etc.) over there to debug locally.
But, if it sounds like I might be doing it right, then I can report that my service code was not being reached by the request. That is, nothing happened in my debugger when I hit the url and received a 404 error in it. I suppose the WCF Starter Kit could
have a way of throwing a 404 error and I might not be aware of it. But, I would tend to assume that the 404 and this debugger experience are pointing in the same direction: there's a configuration issue before the service code is reached.
Jun 26, 2009 08:12 PM|ronjacobs|LINK
RESTful pages might return 404 if the WCF dispatcher cannot match the URI template to a method on your service. Are you using the IIS 7 URL Rewriting module? This can cause issues as well.
Jun 29, 2009 06:00 PM|mule|LINK
Thanks for the thought. Unfortunately, I'm not taking advantage of the rewriting feature (though I've looked at it). I did, however, manage to resolve the problem. It was related to the configuration of IIS. But, I'm not entirely certain how. I decided
to install VS on the machine to debug the process locally. When I attached to the web site locally it told me (a) the ASP.NET 2.0 extension was not enabled and (b) that IIS was set to use the .Net 2.0 framework, not 3.5. I find both of these assertions puzzling
because the Management console definitely lead me to believe otherwise. And, how that VS says it made these changes, I see no difference in the configuration information that the Management Console reports. But, there must be some form of user error having
to do with IIS configuration here. Thanks very much for your assistance. - Danny