Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

<contractRef
  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/" />
<discoveryRef
   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?

share|improve this question
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 Jul 13 '11 at 11:49
    
guys did anyone find a solution for the above? –  user4679 Sep 7 '11 at 11:03
add comment

2 Answers

up vote 1 down vote accepted

@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!

share|improve this answer
    
please explian what u did..even i am facing same issue.. –  user6088 Dec 19 '11 at 10:27
    
Sorry, I don't have any more information. The only lead that @Melih posted was to check the WSDL. –  Kit Menke Dec 25 '11 at 16:58
    
Kit did you solve the issue? –  Melih Öztürk May 28 '12 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 May 28 '12 at 20:25
    
So, I just asked the question to wrong person:) @jenny, did you solved your issue? –  Melih Öztürk Jun 12 '12 at 7:09
add comment

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

share|improve this answer
    
Hi Rob, Can you access SPContext when you add the service to _layouts folder? –  Melih Öztürk May 28 '12 at 11:03
    
Yes. See my walkthrough for an example –  Rob Windsor May 28 '12 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. –  Melih Öztürk Jun 12 '12 at 7:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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