Is it possible to deploy a solution for a web application so that its functions are visible only in this web application?

I have a solution with several cloud features (SP2010). I'd like to deploy this solution to one specific web application . These features should only appear on sites / websites that are in this web application.

By adding secure management entries to my solution, I can deploy this solution to a specific web application. However, the features of my solution still appear in all other web applications.

There is a similar question in SO, see Creating a solution that deploys to selected WebApplications but copies the assembly to the GAC . From the answers given, this seems impossible. However, TS himself claims that it actually works (for him).

EDIT To make things clearer, my confusion is probably best summed up by the following question:

Why is it possible to activate a function in a web application where it has not been deployed?

+4
source share
5 answers

No, you cannot control the visibility of the functions of a website or website in one web application. They will either be visible in all or not.

My first question is: why do you want such a restriction? The component must be a reusable component that can be activated anywhere after deployment. Please note that, however, activation requires the administrator to prevail.

If you really want to limit:
- Hide it and use powershell or stsadm script for deployment.

+2
source

One easy way to prevent users from including a feature in a web application where you do not want to be done is to make all the functions associated with the site dependent on the function of the web application.

+1
source

This visibility is certainly a pain, especially when you have a ton of site collections, a huge variable. Adding new things to the list of features for people to tinker with can be problematic, as it can cause more support than it costs.

If you really want things to not be exposed to others, you will most likely have to deploy these functions as hidden functions, and then activate them from the command line for the people who need them. I suppose you can also write your own Feature admin screen that will take into account the current web application.

0
source

Use the sandbox solution for this. Because Sandbox solutions are not stored on the file system (physical path), and assemblies cannot be deployed to the global assembly cache (GAC).

0
source

Source: https://habr.com/ru/post/1335392/


All Articles