question

presam avatar image
0 Votes"
presam asked mvpkenlin commented

download app source code from Azure app service

I have deployed my app to azure website and wanted to view and download the source code from the site if needed. I am able to connect to the file system of my web service using Kudu. However, the wwwroot directory only has .dll and .exe files. I can't see any of my source code or the directories such as Controllers, Views, etc. How do I see the text source code?

Samuel

azure-webapps
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

How did you deploy? There are so many ways to deploy, and not all of them send source code to Azure side, so very likely you won't see any source code.

0 Votes 0 ·

Hi lextm, thanks for the reply. I deployed the app from VS2019 using the Publish option. Is there any option in VS that i should flag to have it load the source code instead of packaged version...

0 Votes 0 ·

When you deploy from VS using Publish, it only deploy the necessary web UI files (aspx, html, cshtml, vbhtml, css, jscript....etc) and also the compiled files (dll) and project reference files. you cannot find any code-behind page (cs/vb) from the deployed location. You have to collect them from your source location (development PC, source control server, deployment PC.....etc), or Git repo if you have used.

0 Votes 0 ·

Hi lextm, any comments on this issue?

0 Votes 0 ·

1 Answer

SidharthSharma-8788 avatar image
0 Votes"
SidharthSharma-8788 answered mvpkenlin commented

If you've enabled RDP on your server then you can go in and see all of your pages. The source will have been compiled into the dll files so will be harder to read, but you could use somthing like ILSpy to open it if you've lost the other copies.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Sidharth, thanks for the help. What does RDP stand for and where do i look for it in Azure portal.

0 Votes 0 ·

I guess.
RDP = remote desktop protocol.

0 Votes 0 ·