0

I have the following Problem. I have an ASP.NET Web Service which contains several administrative methods like creating a site/list/group for a client application. Some of these methods do this using elevated privileges.

In my Dev-environment i simply deploy it the _layouts folder using the WSP Builder. However, since its deployed to the _layouts folder, it means that every authenticated user can see the web services's wsdl and also can call methods using Storm (for example). My idea for a workaround of this problem was to deploy the web service's .asmx file to the _vti_bin (isapi) folder and in the _layouts folder on my Dev-system.

I would generated a client class using the web service in the _layouts folder, however when executing, i would set the url to the _vti_bin web service. This would theoretically make my web service not available to other users which do not have the definition (wsdl).

But now, when i call my web service i get a file not found exception:

File Not Found.   at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) 
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) 
   at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) 
   at System.Type.GetType(String typeName, Boolean throwOnError) 
   at System.Web.UI.SimpleWebHandlerParser.GetType(String typeName) 
Troubleshoot issues with Windows SharePoint Services. 

What is the best practice way to "secure" a custom sharepoint web service?

1 Answer 1

0

argh, i have fixed it. The "File Not Found" error was actually correct - it did not find the Assembly, because i have changed the version in AssemblyInfo.cs but forgot to also change it in the .asmx file!

rubber-ducking i guess :S

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.