I've created a custom webservice and I have deployed it to the server (ISAPI), it shows up as a webservice on my local machine when I try to select a web reference from Visual Studio.

However I can't click on it and view/invoke the method. At first it said the file type was blocked by Administrators, so I removed the ASMX extension from the list of blocked file types.

Now when I visit http://mysite:1339/myservice.asmx it just gives me the generic error "Cannot complete this action"

or "An error has occurred on the server" if I try to browse to the file from IIS.

I have made sure that my account has full control permissions across all of my sharepoint websites but still the error persists. Can anyone point me in the right direction? These error message are very uninformative! :(

Edit: I didn't notice this before but it was happening before I changed the reference to RWL01's suggestion. I am getting a type error in the URL parameters but looks like the page doesn't serve the error message up exactly right.


  • A note for future readers, using custom web services on Sharepoint is a crap idea and it makes everything a little harder and in 99% of cases not needed. As the current WebServices (with Frontpage RPC for somethings) can do pretty much anything.
    – Amicable
    Commented Jul 9, 2012 at 15:01

1 Answer 1


Ran into a similar issue.

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
  • Searched for "<TokenReplacementFileExtensions>"
  • Added ";asmx" to the list
  • You searched for what? Its not clear to me what values you are changing in Microsoft.VisualStudio.Sharepoint.targets
    – Amicable
    Commented May 8, 2012 at 15:04
  • 2
    Sorry about that I had tags in there that got removed. I was searching for TokenReplacementFileExtensions.
    – RWL01
    Commented May 8, 2012 at 15:55
  • Thanks, I thought this was a great way to get the full class name.
    – Amicable
    Commented May 9, 2012 at 10:00

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.