SharePoint 2007 "Secure" Custom Web Service

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?

Replay

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

Category: 2007 Time: 2013-02-22 Views: 0
Tags: web service 2007

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.233 (s). 12 q(s)