SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created an ASP.Net Web service in SharePoint 2010 by completing the tutorial in the following address:

When I navigate to the service address which is located under ISAPI folder, I get a 404. I can see the WSDL of the service by appending ?wsdl to the address that SharePoint says cannot be found.

Any ideas?


share|improve this question
up vote 3 down vote accepted

The reference to your deployed code (.dll in GAC) is most likely pointing to a wrong location, open the .asmx file in notepad and verify that it is correct/has correct formatting. Example:

<%@ WebService Language="C#" Class="MyAssemblyName, MyClassName, Version=, Culture=neutral, PublicKeyToken=4e93b0eb4e651e96" %>
share|improve this answer
Everything was OK except the PublicKeyToken. Thank you! – Élodie Petit Oct 10 '11 at 14:48

I had the same error - stripping back my code to a simpler form revealed the issue was that I hadn't marked my DTO class with [DataContract] and [DataMember] attribute. I also had to mark my WebMethods as non-cls compliant types.

I got the information that lead me to the solution from the output window of VS.

share|improve this answer

Ran into the same issue but resolved it differently. I used $SharePoint.Project.AssemblyFullName$ to reference my assembly. This works fine except for .asmx files.

I had to modify they Microsoft.VisualStudio.SharePoint.targets file in my development environment for this to work. I did this by going to:

  • C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets
  • Searched for "<TokenReplacementFileExtensions>"
  • Added ";asmx" to the list
share|improve this answer

Your Answer


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.