Click here to Skip to main content
15,888,035 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
My hard drive just crashed. I have/had everything backed up via Google Drive. However, I know some files didn't sync. I published my website to my Azure account shortly before it crashed.

I need to get those .cs files. I wanted to just download the entire site onto my computer (like a reverse publish). How do I do that?

I know how to login to my Windows Azure Website via FTP and WebMatrix. WebMatrix and FTP only displays ashx, asmx and aspx pages. They do not show the code-behind (cs) files. How do I get the aspx.cs, ashx.cs, etc files so I can edit them?
Posted

I found out that the cs files were in a dll that VS or Azure SDK created. I used http://www.red-gate.com/products/dotnet-development/reflector/ to view what was inside my webrole dll that was created. Using this software, I am able to get all the cs files that I needed.

On another note, there is a difference between regular websites and Azure (cloud) websites. Azure takes the code-behind and puts it into a dll. So, using FTP or WebMatrix you are unable to get the code-behind cause all that is shown are aspx, ashx, asmx, etc (NO CODE BEHIND).

1. Download WebMatrix
2. Login to your Azure account through WebMatrix
3. Download your Azure Website
4. Download and install .Net Reflector
5. Open the webrole dll file from your downloaded azure site (which is located within your /bin/ folder) in .Net Reflector
 
Share this answer
 
Nothing can help anyone to download any code-behind files, unless one has insider access to the site, the same as people supporting the side do. This is not "reverse publish". If you are really the author of the site, you should have access to all your data; in this respect, there are no distinction between code-behind, client-side, HTML or any other files. If you cannot access to them all, ask customer service.

—SA
 
Share this answer
 
Comments
Ivan Harris 27-Nov-13 16:52pm    
I am the author. I have FULL access to the website. I just dont understand how to view the cs files from WebMatrix or FTP (once logged in).
Sergey Alexandrovich Kryukov 27-Nov-13 18:24pm    
You either have access to all files you put or not. Do one thing: add some arbitrary file, deploy it, and see if you can get it back. Anyway, this is the question to your cloud hosting customer service. For FTP, there is absolutely no difference what your files are.
—SA
Ivan Harris 27-Nov-13 18:41pm    
As stated above, Google Drive didn't finish syncing when my hard drive crashed. So, the published site contained the most updated files. After installing the new drive, I downloaded Google Drive and got my "old" files back. Since then, I have been trying to figure out how to get the "updated/live" files from my website. There is NO illegal or unethical business going on here (which from your post, is what you are accusing me of).
Sergey Alexandrovich Kryukov 27-Nov-13 19:38pm    
Wait a minute. Who accused you in anything, especially illegal, ever? Where did you get it? Please, don't read between lines...
—SA

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