Is there a way to download source code from cloud services in Windows Azure?

I do not have the latest version of the code deployed in my Windows Azure account, and I need to provide a fix. I know that this can be done using Azure Web Sites, but I'm not sure if this is possible using Azure Cloud Services.

Can anyone help?

+6
source share
4 answers

If you used git to deploy a cloud service, you can get it remotely just like you could with Windows Azure Web Sites. You may have updated the cloud service by first downloading the package to the repository, in which case you may receive the package. But the package is not source code.

From a process point of view, you should tag your deployments with a tag that can be matched in the source control. You never know when to add a β€œpatch” to an offshoot of the current production code.

+2
source

On Windows Azure Cloud Services, instances are loaded as .cspkg packages.

According to the documentation, the Get Package operation retrieves the cloud service package for deployment and stores the package files in Windows Azure Blob storage.

Then you can download and extract this package (it is in the ZIP file format) to extract its contents. See this answer for more details.

In the case of ASP.NET applications, this will be a mixture of text files and binary assemblies (.DLL). In the case of Java, these will be .jar files. You can use the appropriate decompiler to extract the approximate source code. But it would probably be unsafe to change this reverse engineering source code and upload it back into production, at least without rigorous testing.

+1
source

Yes. You can download it with the ftp client.

Ggo to your site’s panel at https://manage.windowsazure.com . Get the credentials (username, password, host) and connect to you with your preferred ftp client.

+1
source

So, Azure has a new portal, and it's a little different. I had to get the code for one of my sites.

To download the code,

  • go to the application service . In the Browse pane, download the publisher profile.
  • Now go to the Deployment Credentials panel. Enter your FTP username and select a password.
  • To connect to ftp, you need the URL from the publication profile ( example.PublishSettings ).
  • Now start your FTP client (FileZilla in my case) and put the FTP address and put the username as sitename\ftpusername ( example\ftp-exmaple-user for me) and enter the password that you selected in the Deployment credentials panel.

wwwroot contains your code!

+1
source

Source: https://habr.com/ru/post/948747/


All Articles