Get source code of my published ASP.NET website from server
Solution 1
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
Solution 2
I think that if you don't have a Repository or something similar but ONLY DLL's you can try with a Reverse enginnering tools...like:
http://www.red-gate.com/products/dotnet-development/reflector/
Hellcat8
Updated on June 16, 2022Comments
-
Hellcat8 almost 2 years
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.
Thanks,
Hellcat8
-
Hellcat8 over 7 yearsIt's a WebForms application. I can see on the server all of the aspx files but not the aspx.cs. And thanks, I'll give them a try as well.
-
Nathangrad over 7 yearsThe code-behind (.aspx.cs) files are the ones which are compiled into the dll in the bin folder. Run one of the decompilers on that file and you'll be able to view the C# code.
-
Hellcat8 over 7 yearsI used dotPeek to decompile my .dll file. It's perfect, thanks a lot.