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?