tags:

views:

59

answers:

2

I've been scratching my head for the past 20 hrs or so trying to figure out what is wrong with my rudimentary WCF app but with absolutely no luck :(

I was following this tutorial: http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/RESTEnabledService05122009034907AM/RESTEnabledService.aspx

and for some reason the WCF is showing a blank page.

I checked IIS, reinstalled .NET 4.0, cleaned and redid .svn handlers, tried on different test servers...and still, nada.

Do you know what might be wrong with the configuration? I figured the code is simple enough (essentially the same as the page I posted) so it can't be the code itself...right?

any help will be appreciate :)


after some testing I realized that the real problem is URL routing.

When I use WCF test client I can invoke the methods just fine, but when I try to access through a browser, it fails with a 400 (bad request).

A: 

Does the WCF service page show up when you debug from Visual Studio? (Presuming that's what you are using to develop WCF.) You should check the Event Viewer for errors.

BrianB
I just checked the event viewer...there's nothing :(I'm using Visual Studio, setting breakpoints in the service doesn't go off so I'm assuming the service isn't even activated, but I can't quite figure out why...
Did you create the project from one of the Visual Studio templates? Either WCF Service Library or WCF Service Application? If so, which one? With the Application template, when you debug it should launch the WcfTestClient app. Does this happen?
BrianB
I'm assuming you aren't yet to the point where you can send requests to the service. If you are, take Nic's recommendation for using Fiddler.
BrianB
Ah, I failed to see your edit.
BrianB
A: 

I find WCF/IIS hosted services sometimes hard to track down problems. Especially if it is configuration/serialization issues your services won't even run. The 2 most useful things I find when tracking down these WCF issues is:

  1. Use something like fiddler for sending the requests. This gives more visibility on errors that are coming back.
  2. Enable service tracing and use the svc trace tool for finding exceptions that are generated before your code runs.
Nic Strong