我可以重新创建ASP.NET网站的源代码和解决方案文件吗? [英] Can I recreate the source code and solution files for an ASP.NET website?

查看:44
本文介绍了我可以重新创建ASP.NET网站的源代码和解决方案文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个为他建立了一个ASP.net Web表单网站的客户.

I have a client that had an ASP.net web-forms website built for him.

他无法与原始开发者联系,但他想对网站进行一些更改(添加页面和更改现有页面).

He is not able to contact the original developer, but he would like to make some changes to the website (adding pages and changing existing ones).

我有ftp站点上的生产文件,但仅此而已.

I have the production files from the ftp site, but that is all that I am able to retrieve.

是否可以仅使用生产文件来创建源代码和解决方案文件,还是他必须从头开始创建站点?

Is it possible to create the source code and solution files with only the production files, or does he have to start over from scratch with the site?

推荐答案

取决于您拥有哪种类型的Web窗体项目.

Depends on what kind of web-forms project you have.

如果您有一个已编译但可更新的网站项目,则服务器上有.vb/.cs和.aspx文件.然后,您可以只创建一个VB.NET/C#网站项目,然后将文件从资源管理器中拖放.
您必须手动添加依赖项(例如bin文件夹中的DLL),但您应该能够在一个小时内完成项目的编译.

If you have a compiled but updatable website-project, there are .vb/.cs and .aspx files on the server. Then you can just create a VB.NET/C# website-project and drag-and-drop the file in from explorer.
You'll have to add dependencies (e.g. DLLs in the bin folder) manually, but you should be able to compile the project in under an hour.

如果它是已编译的项目,则可以使用ILSpy反编译包括项目在内的DLL.
但是,与反编译WinForms应用程序不同,反编译ASP.NET应用程序可能不会导致可编译项目.但这距离您越近越好.如果编译,它可能无法正常运行.您正在为一个不太复杂的应用程序花费大约一周的时间.

If it's a compiled project, you can use ILSpy to decompile the DLLs, including project.
However, unlike decompiling WinForms applications, decompiling an ASP.NET application will probably not result in a compilable project. But it's as close as you can get. If it compiles, it will probably not run fine. You're looking at about a week worth of work for a not too complex application.

此外,如果它是一个Web表单项目并且不太复杂,我将重新开始(如果可能,请复制HTML/CSS标记和图像).我会在ASP.NET MVC中重做它(5是最新版本-我相信-6将包含主要更改).

Also, if it's a web-forms project and not too complex, I'd start over again (maybe copy the HTML/CSS markup and images, if possible). I'd redo it in ASP.NET MVC (5 is the latest version - I believe - 6 will include major changes).

WebForms项目是由PostBacks完成的,因此从技术上讲它很难测试,更糟糕的是,它非常慢.另外,一旦您开始将Postbacks(页面重载)与JavaScript混合使用,就会遇到问题.因此,我将从MVC,jQuery和AJAX(不是Microsoft Ajax控件)开始.那只是我的5美分.

WebForms project do things by PostBacks, and that makes it technically pretty badly testable, and worse, it's very slow. Plus you run into problems once you start to mix Postbacks (page-reloads) with JavaScript. So I'd start over with MVC and jQuery and AJAX (not Microsoft Ajax controls). That's just my 5 cents.

这篇关于我可以重新创建ASP.NET网站的源代码和解决方案文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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