1

I have a client that had an ASP.net web-forms website built for him.

He is not able to contact the original developer, but he would like to make some changes to the website (adding pages and changing existing ones).

I have the production files from the ftp site, but that is all that I am able to retrieve.

Is it possible to create the source code and solution files with only the production files, or does he have to start over from scratch with the site?

MarmiK
  • 5,639
  • 6
  • 40
  • 49
  • Depends how much effort you want to put into it but if you have the DLLs you can extract code fairly easily. The more important question is does your client actually **OWN** the code? It might be that the developer licensed the site for your clients use but the developer still owns the intellectual copyright etc so be careful cracking things open without proper consent from the original developer. Which then leads on to if you are contacting them and original developer is fine for you to alter then they will probably give you source code anyway. – Belogix Jul 16 '14 at 09:59
  • 1
    I understand you said cannot contact but for what reason? Falling out? Hit by a train? These things can get messy if you don't at least ask the original dev what was the agreement. – Belogix Jul 16 '14 at 10:01
  • Thank you for responding. I am fairly confident that the client own the site. He was cheated by a "developer" who subcontracted the development and then didn't pay the programmer. Now it is unanswered emails and phone calls. So he hired me to try and make the changes to the site. – user3844410 Jul 16 '14 at 10:24

1 Answers1

2

Depends on what kind of web-forms project you have.

If you have a compiled but updatable website-project, there are .vb/.cs and .aspx files on the server. Then you can just create a VB.NET/C# website-project and drag-and-drop the file in from explorer.
You'll have to add dependencies (e.g. DLLs in the bin folder) manually, but you should be able to compile the project in under an hour.

If it's a compiled project, you can use ILSpy to decompile the DLLs, including project.
However, unlike decompiling WinForms applications, decompiling an ASP.NET application will probably not result in a compilable project. But it's as close as you can get. If it compiles, it will probably not run fine. You're looking at about a week worth of work for a not too complex application.

Also, if it's a web-forms project and not too complex, I'd start over again (maybe copy the HTML/CSS markup and images, if possible). I'd redo it in ASP.NET MVC (5 is the latest version - I believe - 6 will include major changes).

WebForms project do things by PostBacks, and that makes it technically pretty badly testable, and worse, it's very slow. Plus you run into problems once you start to mix Postbacks (page-reloads) with JavaScript. So I'd start over with MVC and jQuery and AJAX (not Microsoft Ajax controls). That's just my 5 cents.

Stefan Steiger
  • 78,642
  • 66
  • 377
  • 442
  • Good answer but as per my comment you need to be careful you have the rights to do this. It is not necessarily the clients code to reverse engineer. As I pointed out it is relatively trivial to get code out but should you do it (legally) is another question. Up-voting your answer though as technically it is correct / good response. – Belogix Jul 16 '14 at 10:03
  • Thank you so much for the answer, even though it is as bad as I feared. With your advice, I think it would be easier to rebuild the site, as it is not a very straight forward design. I will also continue to encourage the client to find the original programmer and retrieve the source code legitimately. If we could find the programmer, I think he would be happy to pay him for the source code. – user3844410 Jul 16 '14 at 10:33