created my WCF Service in my local machine, now I have to deploy this to another server.

I copied my dll and wsp files and try to add it to the other server using

• Add-SPSolution c:\deploy\.wsp Afterwhich, I deploy it using

• Install-SPSolution –Identity .wsp –WebApplication http:// -GACDeployment

But there is an error:

Install-SPSolution : This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application.

I removed the -WebApplication parameter and it worked but I can access it using any web application. What I want to do is to only access it on a specific web app.

Any idea? thanks

4 Answers 4


I'm not sure, but I think that you can add your .svc to the Module element of SharePoint project. Then add this module to a site scoped feature. In this case your .svc is accessable after feature activation on the site collection level.

If you should activate your feature on the all sites of web application, you can use PowerShell script.


That's not possible, you could howver add a check to your webservice to see if the url it's called from is the designated web app's url


You can control the scope of a web application by only declaring the endpoints in the web.config file of the specific web application.

Alternatively if you are going to build the endpoints in code, you could add a filter to check for the Request URL.


off course you can. I show you one my sharepoint project: enter image description here

You must pay attention on the configuration of your web.config

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.