恢复丢失的 C# 页面
我遇到了一个问题,我丢失了网站页面的所有源(CS),但我只在服务器上发布了页面,所以请是否有任何方法可以使用代码(bin 文件夹)将这些发布的页面恢复到原始页面
I had a problem I lost all my source(CS) of web site pages but I had only published pages on server ,so please if there is any way to recover theses published pages to orignal pages with code,bin folder
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您需要反编译C#。这是一个高级的用户场景,但它是可以完成的......有点。
如何反编译 .NET EXE转换为可读的 C# 源代码?
You need to decompile the C#. It is an advanced user scenario, but it can be done... sort of.
How do I decompile a .NET EXE into readable C# source code?
尝试使用反射器。它可以帮助您恢复所有代码
try to use reflector. it help you to restore all your code
使用最新的备份副本,或回滚到您正在使用的 SVN 的先前版本。
http://www.red-gate.com/products/dotnet-development/ Reflector/ 是一个很好的软件,用于从编译的程序中恢复源代码。
Use your latest backup copy, or roll back to the previous version of SVN you are working on.
http://www.red-gate.com/products/dotnet-development/reflector/ is a good piece of software for recovering source from a compiled program.
如果您的项目是一个网站,您应该能够从服务器 1 对 1 ftp 每个文件。如果您的文件是一个 Web 应用程序项目,那么您就完蛋了。代码文件被编译成二进制文件,如果您丢失了源代码,它就会消失。
If your project was a website, you should be able to ftp each file from the server 1 for 1. If your file was a web application project, you're hosed. The code files are compiled into a binary, and if you lost the source code it's gone.
http://www.red-gate.com/products/dotnet-development/ Reflector/ 可以将 .NET 程序集反编译为源代码 - 但它不会是您编写的代码,因为编译器会更改其中的很多内容(即您的注释将消失)
然后您可以重建在您选择的 IDE 中创建您的项目,然后就完成了。
http://www.red-gate.com/products/dotnet-development/reflector/ Can decompile .NET assemblies into source code - however it won't be the code you wrote as alot of it will have been changed by the compiler (IE your comments will have gone bye bye)
You can then rebuild your Project in your IDE of choice and you are done.
如果程序集尚未混淆,您可以使用 reflector 来从程序集中恢复您的代码。
If the assemblies haven't been obfuscated, you can use reflector to recover your code from the assemblies.