WCF RESTful Service URL Cannot be Found HTTP Error 500

I am taking my first noob steps into creating a RESTful WCF Service which means you can benefit from all my obvious blunders and mistakes.
Here’s the first one:

Slavishly following the excellent article ‘Create RESTful WCF Service API : Step By Step Guide’ I was shocked to find that I got a HTTP 500 error when accessing the Service URL. The problem was merely that I had omitted the webHttp element from the endpointBehaviour configuration.

In my web.config for the service I had:

endpointBehaviors
behavior name="web"

/behavior
/endpointBehaviors

But what I needed was:

endpointBehaviors
behavior name="web"
webHttp/
/behavior
/endpointBehaviors

So now you know.
Keep on noobing!

Advertisements

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: