开发者

ASP.NET MVC within DotNetNuke?

Is it possible to build a DNN module that uses ASP.NET MVC?

Granted that DNN doesn't support ASP.NET MVC out of the box...but since both DNN and MVC run on top of the ASP.NET pipeline...

The reason I ask. Large legacy website running on DNN:

http://blahblahblah.com

I'd like to stick an existing ASP.NET MVC webpage/application here:

http://blahblahblah.com/subfolder
开发者_如何转开发

Is this better done by setting up a virtual directory etc on the server, or is there a way to integrate this with DNN?


DNN is quite tightly tied to Webforms. ASP.Net MVC would be very difficult, maybe impossible to integrate in a module. However DNN does support Webforms MVP (Model View Presenter) which allows for all of the structural/testing benefits of MVC in the WebForms context. All new modules developed by DotNetNuke Corp. are using the Webforms MVP pattern.

Here is a link to get you started Step by Step Webforms MVP and DotNetNuke – Part 1.


Download my DnnMvcBridge project and you can absolutely build DNN modules with MVC 4 and Razor.

https://dnnmvcbridge.codeplex.com/


For Asp.Net MVC, take a look to this:

http://www.charlesnurse.com/post/Developing-Modules-for-DotNetNuke-using-ASPNET-MVC-Part-1-Introduction.aspx

and this:

http://bigfootmvc.codeplex.com/

which is not Asp.Net MVC, but another MVC framework (it's supposed to not require anything not native to the DNN dev environment).


If you just want a separate MVC application in a subdirectory, you should be able to do that. The main tricky part would be integrating users/sessions (assuming you need to), but that shouldn't be too big a hurdle to figure out (as opposed to re-coding your existing MVC application). You will probably also need to update the web.config for your MVC application to clear out anything from DNN (most importantly, the HTTP Modules and Handlers, so they don't interfere with routing).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜