views:

165

answers:

1

I'd like to supplement my existing DotNetNuke website with a side application which is built on MVC.

To do this, I'd like to set the MVC application up on a separate subdomain (e.g. subapp.mydomain.com) and to connect to the same database.

I've tried this already and I can get the MVC app to connect at the ASP membership levels (just using the normal forms and authentication providers) - but I'm wondering if there is any way I can get the MVC app to use the full DotNetNuke membership providers - so that I can call DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo() within my MVC application? Is this just a case of using the DotNetNuke membership DLLs and changing the web.config? If so, which settings do I need to use? - I've tried and just ended up with lots of yellow-screens-of-death

Thanks for any pointers/advice.

+1  A: 

I think you're going to need to add a lot of DNN to your MVC site in order for this to work. DNN processes and sets the current user information via some HTTP modules setup in the web.config, as well as some code in the Global.asax, I believe. So, I would think that the first step would be to bring over the httpModules section of the DNN web.config into your MVC site, and then also get the dotnetnuke configuration section, as well (or at least the sections that seem related). Then see if that, at least, changes the error message you're seeing.

All that being said, I still think you'll be missing some code from the Global.asax (at the least, setting up their dependency injection container). I'm not sure if you want to try to migrate that code into your MVC app as well, or not...

bdukes