通过 SharePoint 2010 上的虚拟文件夹映射的 ASP.NET 4.0 应用程序
我正在考虑在 IIS 上的 SharePoint 2010 应用程序下发布 ASP.NET MVC 3 应用程序(不是在 SharePoint 内作为 SPSite 或其他内容,只是用于与 SP 进行 SSO 集成的常规 IIS 应用程序) 。
MVC 应用程序将仅继承一些配置。它没有对 SharePoint 的引用,并且 SharePoint 除了作为 IIS 中 SharePoint 2010 应用程序下的子应用程序之外没有任何对它的引用。
3重问题:
- 是否可以?
- 例如,在 3.5 上运行的 SharePoint 2010 以及在 4.0 上运行的新应用程序是否存在任何明显问题?足以使用不同的应用程序池吗?
- 我担心 MVC 应用程序与 SharePoint 之间的 web.configs 继承
I'm considering publishing an an ASP.NET MVC 3 app under a SharePoint 2010 application on IIS (not inside SharePoint as a SPSite or whatnot, just a regular IIS application for SSO-integration w. SP).
The MVC app would then only inherit some configs. It has no reference to SharePoint and SharePoint does not have any reference to it other than it being an sub application under the SharePoint 2010 app in IIS.
3-fold question:
- Is it possible?
- Are there any obvious issues with SharePoint 2010 running on 3.5, and my new app running on 4.0 for instance? Sufficient to use different app-pools?
- I'm concerned about the inheritance of web.configs between my MVC app to SharePoint's
web.config. Are there any issues regarding web.config inheritance between these two?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
更新(2013 年 2 月 27 日):我们不再需要使用用于停止从 SharePoint 继承到 ASP.Net MVC 3 应用程序的 XML 元素。我们需要使用为 ASP.Net 应用程序提供 FullTrust Web.Config 中的 XML 元素。
需要从 ASP.Net MVC 3 应用程序禁用某些 HTTP 模块/HTTP 处理程序。
对于 SharePoint 2010 场景,我还必须将移动到XML 元素从 SharePoint 2010 web.config 文件复制到 C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG\web.config 文件,因为它与 .NET 4.0 冲突。如果将其移至此处,SharePoint web.config 仍将继承它。
无论如何,我不会在这里重复所有步骤。
请参阅我的博客文章:
MVC 3 与 SharePoint Server 2010:
http://samsonfr.wordpress.com/2013/02/26/ recette-amliore-intgrer-une-application-asp-net-mvc-3-sous-un-site-web-iis-hbergeant-sharepoint-server-2010/
带有 WSS 3.0 的 MVC 3:< /strong>
http://samsonfr.wordpress.com/2013/02/26/recette-amliore-intgrer-une-application-asp-net-mvc -sous-un-site-web-iis-hbergeant-wss-3-0-sharepoint-2007/
它是法语,但我想你可以使用谷歌翻译。
此致,
UPDATE (February 27, 2013): We no longer need to use <location> XML element to stop inheritance from SharePoint to the ASP.Net MVC 3 application. We need to give FullTrust to the ASP.Net application using the <trust level="Full" originUrl="" /> XML element in the Web.Config.
Some HTTP Modules / HTTP Handlers need to be disabled from the ASP.Net MVC 3 application.
For the SharePoint 2010 scenario, I also had to move the <sectionGroup name="system.web.extensions"> XML element from the SharePoint 2010 web.config file to C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG\web.config file because it conflicted with .NET 4.0. If you move it there, it will still be inherited by SharePoint web.config.
Anyway, I won't repeat all steps here.
Please see my blog post:
MVC 3 with SharePoint Server 2010:
http://samsonfr.wordpress.com/2013/02/26/recette-amliore-intgrer-une-application-asp-net-mvc-3-sous-un-site-web-iis-hbergeant-sharepoint-server-2010/
MVC 3 with WSS 3.0:
http://samsonfr.wordpress.com/2013/02/26/recette-amliore-intgrer-une-application-asp-net-mvc-sous-un-site-web-iis-hbergeant-wss-3-0-sharepoint-2007/
It's in french but I guess you can use Google translate.
Best regards,
我尝试过但失败了。目前必须在单独的 IP 上托管 .Net 4 应用程序,这会产生各种跨脚本/安全问题。我在这里找到了一些提示: http://www.asp.net/learn/whitepapers /aspnet4/breaking-changes 但无法使其正常工作。
I have tried and failed. Currently having to host the .Net 4 app on a seperate IP, which creates all kinds of cross scripting/security issues. I found some tips here: http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes but couldn't get it working.
如果您的应用程序仅在虚拟文件夹下运行(因此如果需要,它将可以访问
SPContext
),而不是实际在应用程序文件夹
下运行(因此根本没有集成到 Sharepoint 中)那么我猜 Asp.net MVC 3 是不可能的,因为它与 .net 4 的关系。但。 Asp.net MVC 2 绝对是可能的。我正在开发这样一个应用程序,它按预期工作。不过,我花了一段时间来集成它...我的集成使得仅更改根 Sharepoint 的站点 web.config 成为可能(仅向其中添加新内容,没有删除或更改任何内容)。我什至没有更改路由定义的 Global.asax 。
我的应用程序作为 Sharepoint Foundation 2010 站点下的虚拟文件夹运行,可以访问
SPContext
,并且安全性也由 Sharepoint 控制(身份验证由 SP 2010 站点执行)。所以这绝对是可能的。但它必须是 Asp.net MVC 2,因为它运行在 .net 3.5 上,与 Sharepoint 2010 相同。
If your application will run only under Virtual folder (so it will have access to
SPContext
if it needs to) an not an actually underApplication folder
(hence not being integrated into Sharepoint at all) then I guess Asp.net MVC 3 is out of the question because of its .net 4 relation.But. Asp.net MVC 2 is definitelly possible. I'm developing such an app and it works as expected. It took me a while to integrate it though... My integration makes it possible to only change root Sharepoint's site web.config (only add new things to it, nothing's been taken out or changed). I haven't changes even the
Global.asax
for routing definition.My application is running as a virtual folder under Sharepoint Foundation 2010 Site and has access to
SPContext
and is also security controlled by Sharepoint (authentication is performed by the SP 2010 Site). So that's definitely possible.But it has to be Asp.net MVC 2 since it runs on .net 3.5, the same as as Sharepoint 2010.