可以将解决方案部署到Web应用程序,使其功能仅在此Web应用程序中可见吗? [英] Is it possible to deploy a solution to a web application so that its features are only visible within this web application?

查看:142
本文介绍了可以将解决方案部署到Web应用程序,使其功能仅在此Web应用程序中可见吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个具有多个站点/ Web范围的功能(SP2010)的解决方案。 Id希望将此解决方案部署到一个特定的Web应用程序。这些功能只能显示在这个Web应用程序中的网站/网页中。



通过在我的解决方案中添加安全控制条目能够将解决方案部署到特定的Web应用程序。但是,我的解决方案的功能仍然显示在所有其他Web应用程序中。



在SO上有一个类似的问题,请参阅创建部署到所选WebApplications的解决方案,但将程序集复制到GAC 。从答案中可以看出,这是不可能的。但是,TS本身就表示,它实际上正在工作(对他而言)。



编辑
为了使事情变得更清楚,我的困惑是可能最好地总结为以下问题:



为什么可以激活未部署到Web应用程序的功能?

解决方案

不,您无法控制Web /站点作用域功能对单个Web应用程序的可见性。我们的第一个问题就是为什么你想要这样的限制?功能应该是可重用的组件,可以在部署后随时激活。但是,请注意,激活需要管理员优先级。



如果您真的要限制:

- 隐藏它并使用powershell或stsadm脚本部署。


I have a solution with several site/web scoped features (SP2010). Id like to deploy this solution to one specific web application. The features should only show up in the sites/webs which reside in this web application.

By adding Safe Control Entries to my solution I am able to deploy the solution to a specific web application. However, the features of my solution still show up in all other web applications.

There is a similar question on SO, see Creating a solution that deploys to selected WebApplications but copies the assembly to GAC. From the answers given, it seems that it is not possible. However the TS himself states that it is actually working (for him).

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

Why is it possible to activate a feature on a web application where it has not been deployed to?

解决方案

No, you cannot control the visibility of web/site scoped features to single web application. They will be either visible in all of them or none.

My first question would be why do you want a restriction like this ? A feature should be reusable component which can be activated anywhere once deployed. Note that however, the activation needs Administrator previleges.

If you really want to restrict:
- Hide it and use powershell or stsadm script to deploy.

这篇关于可以将解决方案部署到Web应用程序,使其功能仅在此Web应用程序中可见吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆