从ASP.NET WebForms重定向到MVC [英] Redirecting from ASP.NET WebForms to MVC

查看:113
本文介绍了从ASP.NET WebForms重定向到MVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个现有的大型ASP.NET WebForms应用程序,但是现在我们正在迁移到MVC.

We have a large existing ASP.NET WebForms application, but we are now moving over to MVC.

我们正在尝试创建一个全新的VS项目以完全隔离新代码,而不是尝试将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.

第一步,我们要使用WebForms应用程序的现有登录过程,然后重定向到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.

有人知道这样做的简单方法吗(即在同一VS解决方案中从WebForms项目重定向到MVC项目)吗?到目前为止,我发现的所有信息都建议从MVC的头开始,或者将MVC组合到现有的Webforms项目中-都不是很可行.

Does anyone know of an easy way to do this (i.e. redirect from a WebForms project to the MVC project, in the same VS solution)? 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.

非常感谢,

保罗

推荐答案

重定向是最简单的部分:Response.Redirect("http://domain.com/mvc/home/index");.较困难的部分是设置单个登录过程,以便在旧版应用程序上对用户进行身份验证时,将在新的MVC应用程序上自动对用户进行身份验证.这是不错的文章,其中介绍了如何在两个ASP之间设置SSO方案. NET应用程序.

Redirecting is the easy part: 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. Here's a nice article covering how to setup a SSO scenario between two ASP.NET applications.

这篇关于从ASP.NET WebForms重定向到MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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