Click here to Skip to main content
15,889,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a deployed version of an asp.net 2.0 website developed by visual studio 2005... But unfortunately, the source code has been deleted...

I want to get the source code version of the website from the deployed version

There are tools to extract code from DLL to class libraries but I tried to search a lot I don't find any tools to extract DLL to asp.net code-behind

What can I do?

Thanks in advance
Posted

Pretty much? Nothing. It's not something that should happen on a regular basis - and you wouldn't want it to work well because others could steal your work if it did.

You can try some of the DLL decompilation tools out there (google will help you there) but I don't fancy your chances much of getting good, readable code from it. It will probably be quicker to regenerate the whole project from scratch.

Check your backups - and if you don't have any, then consider this a lesson in why you should always have a good backup system!
 
Share this answer
 
Look, the asp.net site is deployed as the following:

  1. The 'bin' folder: contains one or more assemblies(.dll files) of code-behind classes.
  2. The content files: .js and .css files distributed in folders just as your project.
  3. The .master, .aspx and .ascx files: in the @Master @Page and @Control perspectives(in the top of the file) the attribute inherits determines which assembly in 'bin' folder contains the code-behind class(in the form of "class, assembly name").


you should do the following:


  1. disassemble the code-behind class in a .vb or .cs file and save it in the same folder as the page.
  2. remove assembly name from the inherits attribute.
  3. add a 'codeBehind' attribute with the name of the code-behind file.


To disassemble the classes you can use Reflector.Net[^]

wish you luck.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900