Search code examples
asp.net-mvc-3iis.net-4.0.net-2.0subapplication

ASP.NET 4.0 app mapped through virtual folder on SharePoint 2010


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?


Solution

  • 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,