Jaap Vossers' SharePoint Blog

Just another WordPress.com site

Custom WCF Service in SharePoint returning HTTP 400 Bad Request

with one comment

I followed the MSDN article Creating a Custom WCF Service in SharePoint Foundation to deploy my own custom WCF service into the ISAPI folder of SharePoint 2010. I was under the impression that browsing to the url where my .svc file was located would return some kind of WSDL. I was also expecting that I could use this url to add a Service Reference in Visual Studio 2010. Instead, I was getting a HTTP 400 Bad Request responses in both scenarios, making me think there was something wrong with the implementation of my service.

In fact, as it turns out, there was nothing wrong with my service implementation – all I had to do was simply append /mex to the service url i.e. http://sharepoint/_vti_bin/MyService.svc/mex

Hope this helps!

Written by jvossers

June 17, 2011 at 11:14 am

Posted in Uncategorized

One Response

Subscribe to comments with RSS.

  1. so, How can I call the service?
    I am trying to add web refernce, and I can’t

    rivka

    May 6, 2013 at 8:43 pm


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: