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 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.

http://mysite:1339/_layouts/error.aspx?ErrorText=Could%20not%20create%20type%20%27%24SharePoint%2EProject%2EAssemblyFullName%24%27%2E

share|improve this question
    
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 Jul 9 '12 at 15:01
add comment

1 Answer 1

up vote 2 down vote accepted

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