简体   繁体   English

如何将项目从具有VB .NET的ASP .NET WebForms缓慢迁移到MVC C#?

[英]How can I slowly migrate a project from ASP .NET WebForms with VB .NET to MVC C#?

At the moment I have a legacy website written in vb .net and web forms. 目前,我有一个以vb .net和Web形式编写的旧网站。 Its about ten years old. 它大约十岁了。 I want to start to migrate components of it over to C# MVC. 我想开始将其组件迁移到C#MVC。

My plan is to create a separate project in the solution in C# with .NET MVC, and do all the controller code etc in there. 我的计划是使用.NET MVC在C#解决方案中创建一个单独的项目,并在那里执行所有控制器代码等。 I would need to wire up routing etc from the vb.net project though, into this project. 我需要将路由等从vb.net项目连接到该项目中。 Eventually over time the plan is to migrate the entire project over to C# with .NET MVC. 最终,随着时间的推移,计划将使用.NET MVC将整个项目迁移到C#。

The app uses forms auth (albeit a bit of a hacky implementation of it), so if someone logs into the legacy app, their authentication should also be recognised in the "new" project/system. 该应用程序使用表单身份验证(尽管有点hacky实现),因此,如果有人登录到旧版应用程序,则还应在“新”项目/系统中识别其身份验证。

How would I do this? 我该怎么做?

EDIT: There is stuff taped into code behind en masse (mainly on row data bound etc for gridview formatting) plus a gigantic class that does absolutely everything. 编辑:有大量东西被粘贴到代码中(主要是在网格视图格式的行数据绑定等上)加上一个可以绝对完成所有工作的巨型类。 Architecturally its about as bad as you could hope for. 从结构上讲,它和您希望的一样糟糕。

As an initial step, you can convert your VB project into C# using SharpDevelop. 首先,您可以使用SharpDevelop将VB项目转换为C#。 They have independent IDE and also Visual Studio plugin. 他们有独立的IDE和Visual Studio插件。

即使您声明由于时间限制您没有时间开始新项目,这也是最好的方法,因为与开发新项目相比,您将花费更多的时间转换代码。

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

相关问题 我如何将一个简短的 ASP.NET WebForms 应用程序迁移到 ASP.NET MVC 应用程序? - How i can migrate a short ASP.NET WebForms Application to ASP.NET MVC Application? 将应用程序从VB.NET Webforms移动到MVC C# - Moving Application from VB.NET Webforms to MVC C# vb.net asp.net webforms application> c#asp.net mvc razor应用程序 - vb.net asp.net webforms application > c# asp.net mvc razor application 如何在ASP.NET Webforms网站项目中一起使用Webforms和ASP.NET MVC? - How do I use Webforms and ASP.NET MVC together in an ASP.NET Webforms Website project? 如何在Visual Studio 2013中编辑ASP.Net MVC C#项目模板文件? - How can I edit ASP.Net MVC C# project template files in Visual Studio 2013? 我的ASP.NET MVC4项目中可以有一个文件夹是Webforms项目吗? - Can I have a folder in my ASP.NET MVC4 project that is a webforms project? C#和ASP.NET MVC - 图像加载缓慢 - C# & ASP.NET MVC - images loading slowly 使用ASP.Net-mvc 4从C#转换为VB - Conversion from C# to VB with ASP.Net-mvc 4 我可以像在ASP.NET MVC中一样在Webforms项目中创建HTML助手吗? - Can i create html helpers in Webforms project like in asp.net mvc? 我如何在ASP.NET C#MVC3中将数据从数据表导出到Excel? - How can i export the data from a data table to excel in asp.net c# mvc3?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM