I am given a task to move an old ASP.net project from one server to the other. The server on which the project is currently hosted has the 'Published' version and the actual 'source code' along with the solution is completely missing. Is there any way to recover the source code from the published version of the project?
Asked
Active
Viewed 844 times
0
-
1You can use decompilers such as [JetBrains DotPeek](https://www.jetbrains.com/decompiler/), but what you get out may not be compilable, but it will get you a lot closer than starting from scratch. Variable names, especially local ones, may be mangled and you may see compiler optimizations or "sugar" (like closures) that can make things difficult. – Ron Beyer Jun 18 '19 at 19:36
-
1Read this https://stackoverflow.com/questions/24777619/can-i-recreate-the-source-code-and-solution-files-for-an-asp-net-website And this https://stackoverflow.com/questions/7421401/recover-asp-net-project-from-iis-deployment – Mohammad Ansari Jun 18 '19 at 19:37
-
@Roy I have the compiled Dlls in the bin folder. Not any exe file. Can I still use dotpeek to decompile and get the source code? – Rick Jun 18 '19 at 19:42
-
1I don't think there should be any EXE files. You just have to decompile the app DLL, and yes, DotPeek can decompile the DLL. – Ron Beyer Jun 18 '19 at 20:01
-
1Why do you want to get the source code? Just copy the entire site directory to another server and it'll just work. – CodeCaster Jun 19 '19 at 08:44