Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question

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.

share|improve this answer

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

share|improve this answer

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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.