Is it possible to deploy the SVC file to something other then the ISAPI folder of SharePoint. Basically I'd like my solution to be webapplication scoped, so that the webservice cannot be called from other web applications then the one I deploy them to.
If you place your SVC file in the ISAPI folder and the DLL in the GAC, then the service can be called from every web application, since the ISAPI folder and GAC are shared.
Update: I now deployed my code via a solution and manually placed a SVC file into the inetpub dir. I don't believe deploying stuff to inetpub is an option with SharePoint solutions, is it? There are a couple of downsides to this approach: - Working in a farm environment, this would mean I'd have to manually deploy the SVC to each front end machine. But that's something I could script I guess. - When I extend an application to a different access mapping, the new inetpub dir would have to get the SVC too. - When I update the version number of my assembly, I'd have to update all SVC files too. But that too can be scripted.
The major advantage is that my service is now limited to a single web app.
The thing I don't really understand though: how do they do this stuff at larger hosters? Or is deploying webservices simply not an option there? I really like the multi tenant approach SP2010 offers, but I wish they would have taken it just a bit further then they have.