How to get Source Code? RRS feed

  • Question

  • Hi,

    I have a web application developed in MVC 5 and deployed to azure web app. But unfortunately my hard-disk is damaged and data recovery is not possible and my source code is in that drive.

    Can anybody please tell me is there a way to get source code from azure web app as it's a very extensive web application with tons of features. My team and me have to go through the development process all over again if we aren't able to recovery source code. Kindly please help.

    Best Regards,

    Muhammad Asad


    Monday, July 3, 2017 5:39 PM

All replies

  • Hopefully you were using source control like Git or TFS so you can get it from there. If you cannot then you'll have to piecemeal things back together. The content files including HTML, CSS, images and scripts will be on the server along with the .asax and config files. You can bring those back. 

    The original code isn't available but you can bring back the bin folder and then run your assemblies through a decompiler to get the code out. I would recommend JustDecompile from Telerik as it can generate the project file as well. You'll lose the comments and the generated code won't be identical to what you original had because the compiler will morph the code during compilation. But it'll give you a starting point to restore.

    Once you have the base project set back up I'd strongly recommend putting it into source control so you can then begin making changes and revert back if things go wrong, or the hard drive crashes. Ensure you use an SCC that isn't on your local drive. TFS is free for small teams (<= 5 users) so that is a start. Git is free as well but if you don't want people to see your code then you need to pay money.

    Michael Taylor

    Thursday, July 6, 2017 2:42 PM
  • Without using something like TFS, a code repository, the code is lost forever.
    Thursday, July 6, 2017 3:12 PM