2

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.

bdukes
  • 152,002
  • 23
  • 148
  • 175
  • I've never actually tried this, but I don't see why it wouldn't be possible. Can you provide any more information about the errors you are receiving or your web.config file? – Brad Gignac Mar 02 '10 at 21:36
  • I think don't worry about any providers, just think about routes and web.config and global.asax, if they are settled you will get through it. I'm also learning how to do this, but believe me it's more easier than we think – Prashant Lakhlani Mar 03 '10 at 12:15

1 Answers1

2

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
  • 152,002
  • 23
  • 148
  • 175