如何在我目前的MVC应用程序集成Nearforums [英] How to integrate Nearforums in my current MVC app

查看:175
本文介绍了如何在我目前的MVC应用程序集成Nearforums的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个ASP.NET MVC 4.0应用程序。现在我试图找到第三方论坛,可能我的MVC应用程序中集成本身。我做了一些搜索,发现nearforums似乎不错。

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.

我已经下载了网页和Db脚本,我读过的文档和管理,以创建一个新的数据库,运行SQL脚本,创建下IIS 7.0更改连接字符串一个新的网站,它运行伟大!

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!

我的问题是:

虽然安装并没有什么伟大的工作,我现在想弄清楚如何将这个论坛我整合现有的MVC应用程序中。

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.

我目前的MVC应用程序都有自己的数据库和自己的用户表(所有凭证都存储)。我的MVC应用程序有验证用户登录,然后存储在会话某些值(以备后用等)。

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…).

在注视下载nearforum网站及其文件,我没有找到一个控制器文件夹及其控制器。我想我期待这个,所以我可以看一下控制器呼吁什么意见,如果这些意见是强类型等等...

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…

在我已经想通了这一点,我可以很容易我现有的应用程序中集成这一点。
请记住,我不想进行内的&LT论坛; IFRAME> ...< / IFRAME> 我也不希望有这个论坛托管在其他地方。

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.

推荐答案

要整合现有的Web应用程序中的Nearforums codeBase类(控制器)和输出文件(意见,CSS和JS)是不是一个好主意。你必须有code要集成一个清醒的认识。

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.

最好的办法是运行在一个<一nearforums href=\"http://learn.iis.net/page.aspx/150/understanding-sites-applications-and-virtual-directories-on-iis/\"相对=nofollow> IIS子程序,如 /论坛/ ,因为这样你可以从现有的功能中受益,而无需关心code。当您设置在网站上subapp,您可以将现有的mainsite用户到Nearforums用<详细的不同的技术认证href=\"http://nearforums.$c$cplex.com/wikipage?title=Existing%20users%20authentication&referringTitle=Documentation\"相对=nofollow> Nearforums文档。

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.

这篇关于如何在我目前的MVC应用程序集成Nearforums的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆