简体   繁体   English

从ASP.NET WebForms重定向到MVC

[英]Redirecting from ASP.NET WebForms to MVC

We have a large existing ASP.NET WebForms application, but we are now moving over to MVC. 我们有一个庞大的现有ASP.NET WebForms应用程序,但我们现在转向MVC。

Rather than go through a painful process of trying to integrate MVC into the existing app, we're looking at creating a brand new VS project to completely isolate the new code. 我们正在考虑创建一个全新的VS项目来完全隔离新代码,而不是经历一个尝试将MVC集成到现有应用程序中的痛苦过程。

As a first step, we are wanting to use the existing login process of the WebForms app, then redirect over to the MVC app. 作为第一步,我们希望使用WebForms应用程序的现有登录过程,然后重定向到MVC应用程序。

Does anyone know of an easy way to do this (ie redirect from a WebForms project to the MVC project, in the same VS solution)? 有没有人知道一个简单的方法(即在同一个VS解决方案中从WebForms项目重定向到MVC项目)? All the information I've found so far suggests either starting from scratch in MVC, or combing MVC into the existing Webforms project - neither of which is very feasible. 到目前为止我发现的所有信息都建议从MVC开始,或者将MVC结合到现有的Webforms项目中 - 这两者都不可行。

Many thanks, 非常感谢,

Paul 保罗

Redirecting is the easy part: Response.Redirect("http://domain.com/mvc/home/index"); 重定向是一个简单的部分: Response.Redirect("http://domain.com/mvc/home/index"); . The more difficult part would be to set up a single sign on process so that when a user is authenticated on the legacy application he would be automatically authenticated on the new MVC application. 更困难的部分是在进程上设置单点登录,这样当用户在遗留应用程序上进行身份验证时,他将在新的MVC应用程序上自动进行身份验证。 Here's a nice article covering how to setup a SSO scenario between two ASP.NET applications. 这是一篇很好的文章,介绍了如何在两个ASP.NET应用程序之间设置SSO场景。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM