从服务器获取我发布的 ASP.NET 网站的源代码 [英] Get source code of my published ASP.NET website from server

查看:45
本文介绍了从服务器获取我发布的 ASP.NET 网站的源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已通过 Visual Studio 将我的 ASP.NET 网站发布到我的 Windows Server 2012.

I've published my ASP.NET website to my Windows Server 2012 via Visual Studio.

但事情发生了,我失去了所有的消息来源.我有备份,但还不够新.我可以重新编码丢失的所有内容,但我不记得所有内容.

But things happened, and I lost all of my sources. I had a backup but it is not recent enough. I could re-code everything that is missing but I don't remember all of it.

我想知道是否可以从我发布网站的服务器获取源代码?我有完整的访问权限.

I was wondering if it's possible to get the source code from the server where I published my website ? I have a full access on it.

谢谢,

Hellcat8

推荐答案

很抱歉听到这个消息!
ASP.NET (WebForms) 应用程序由代码隐藏类和 .aspx 页组成.所有的代码隐藏类都被编译成一个类库,位于根目录下的 bin 文件夹中.
ASP.NET (MVC) 应用程序具有类似的结构,但使用视图而不是 .cshtml/.vbhtml 扩展名.

如果您丢失了应用程序的后端代码,则需要反编译 dll 文件以取回您的代码.遗憾的是,您将丢失所有代码注释,因此需要重新创建它们.

一些反编译器:dotPeekILSpyJustDecompile反射器

Sorry to hear that!
An ASP.NET (WebForms) application consists of code-behind classes and .aspx pages. All the code-behind classes are compiled into a class library located in the bin folder in the root directory.
An ASP.NET (MVC) application has a similar structure, but with views instead with the .cshtml / .vbhtml extension(s).

If you've lost the back-end code for the application, you'll need to decompile the dll file to obtain your code back. Sadly, you'll lose all of the code comments so they'll need to be re-created.

Some decompilers: dotPeek, ILSpy, JustDecompile, Reflector

这篇关于从服务器获取我发布的 ASP.NET 网站的源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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