I managed to port Asp.net MVC to run in a Sharepoint site (only inside a particular folder not everywhere) by:
- Writing an IHttpModule that I use to register routes, areas, view engine and virtual path provider inside the Init method, that is called only once per application life hence it works like an application_start event
- Writing a custom URL routing module that only performs routing for a particular subfolder path, all other paths are ignored, so everything else works just as it does and is completely handled by sharepoint
- Writing a custom view engine that defines different view/master paths related to the subfolder where MVC is running
- Writing a costom virtual path provider that should allow me to reference masterpages based on my configured subfolder where MVC is running.
- Adding a virtual folder (without assigning it an application) to my Sharepoint's site, so my app will be running as part of Sharepoint site and not as a separate application
- Customizing Sharepoint site's config to add my MVC application's configuration, adding MVC assemblies to compilation section, adding namespaces to <pages> element so I my view will see Html helpers, and adding two modules (my intialization module
that registers routes etc) and subfolder routing module.
But I would like to accomplich
View Complete Post