I've used the Walkthrough: Creating a Custom ASP.NET Web Service from MSDN to create my cusom WCF Service and deploy to my Sharepoint 2010 server.

http://myserver/_vti_bin/randomchatwebservice.asmx seems to work fine and it shows service methods. But I get "The webpage cannot be found" when I try to reach http://myserver/_vti_bin/randomchatwebservice.asmx?wsdl or http://myserver/_vti_bin/randomchatwebservice.asmx?disco.

I have RandomChatWebServicedisco.aspx and RandomChatWebServicewsdl in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI and spdisco.aspx file has

  ref=<% SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(
         spWeb.Url + "/_vti_bin/RandomChatWebService.asmx?wsdl"),
         Response.Output); %>
  docRef=<% SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(
            spWeb.Url + "/_vti_bin/RandomChatWebService.asmx"),
            Response.Output); %>
  xmlns="http://schemas.xmlsoap.org/disco/scl/" />
   ref=<% SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(
          spWeb.Url + "/_vti_bin/RandomChatWebService.asmx?disco"),
          Response.Output); %>
  xmlns="http://schemas.xmlsoap.org/disco/" />

definitions. What seems to be wrong?

  • 1
    if you answered yourself to the question, please don't edit your post, but add an answer. You will be able to mark as answer in few days, and the question will appear solved in the pages of the site
    – Steve B
    Commented Jul 13, 2011 at 11:49
  • guys did anyone find a solution for the above?
    – user4679
    Commented Sep 7, 2011 at 11:03

2 Answers 2


@Melih Öztürk posted a solution to his own question:

contactRef part of the WSDL file seems to be not well-formed. I changed it and problem solved.

I'm posting this as a community wiki since this question seems to be abandoned. If anyone has more information, feel free to add it!

  • please explian what u did..even i am facing same issue..
    – user6088
    Commented Dec 19, 2011 at 10:27
  • Sorry, I don't have any more information. The only lead that @Melih posted was to check the WSDL.
    – Kit Menke
    Commented Dec 25, 2011 at 16:58
  • Kit did you solve the issue?
    – Mlh
    Commented May 28, 2012 at 11:05
  • @MelihÖztürk Er... I'm pretty sure you said that you had solved this issue when you edited it into your question. I just moved it into this answer.
    – Kit Menke
    Commented May 28, 2012 at 20:25
  • So, I just asked the question to wrong person:) @jenny, did you solved your issue?
    – Mlh
    Commented Jun 12, 2012 at 7:09

My recommendation is to deploy the custom web service to the Layouts (_layouts) folder rather than the ISAPI (_vti_bin) folder. All the issues with the disco and wsdl generation go away.

I posted a walkthough for this on my blog, Walkthrough: Creating a Custom ASP.NET (ASMX) Web Service in SharePoint 2010

  • Hi Rob, Can you access SPContext when you add the service to _layouts folder?
    – Mlh
    Commented May 28, 2012 at 11:03
  • Yes. See my walkthrough for an example Commented May 28, 2012 at 14:28
  • So what is the main differences between deploying custom web service to _layouts and _vti_bin folders? I thought that accessing SPContext object differs on these selection.
    – Mlh
    Commented Jun 12, 2012 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.