I’ve created an ASP.NET MVC 4.0 application. Now I’m trying to find a 3rd party forum that could integrate itself within my MVC app. I did some searching and found nearforums which seems nice.
I’ve downloaded the Web and Db Scripts, I’ve read the documentation and manage to create a new database, run the SQL Scripts, create a new website under IIS 7.0 change the connection string and it runs great!
My question is the following:
Although the installation and what not worked great, I’m now trying to figure out how to integrate this forum inside my existing MVC application.
My current MVC application has its own database and its own User Table (where all the credentials are stored). My MVC app has a login which authenticates the users and then stores some values in the Session (for later usage etc…).
While looking at the downloaded nearforum website and its files, I didn’t find a Controller folder and its controllers. I guess I was expecting this so I can look at what Controller is calling what Views and if these Views were strongly typed etc…
Once I would’ve figured this out, I could easily integrate this within my existing app.
Keep in mind that I do not wish to place the forum within an <iframe>…</iframe> nor do I wish to have this forum hosted somewhere else.
Can anyone shed some light on how/where should I go about this.
To integrate the Nearforums codebase (controllers) and output files (views, css and js) in your existing web application is not a good idea. You would have to have a clear understanding of the code you are integrating.
The best way would be to run nearforums on an IIS subapplication, like
/forums/, in that way you can benefit from the existing functionality without caring about the code. After you set up the site on a subapp, you can authenticate your existing “mainsite” users into a Nearforums using different techniques detailed on the Nearforums documentation.