Migrate Azure website to local PC VIsual Studio - azure

I have created a Nopcommerce CMS website via Azure websites gallery. Now I need to migrate the .sln file and databases to my PC to give the whole package for a friend. How to do this.

There are a couple of ways to do this.
You could just connect to your web site using an FTP Client (ie:
FileZilla) and just pull the files down that way, or
Use Site Control Management ("Kudu") to download a .zip of your web site.
I prefer #2. It's fast and easy.
Here are the steps for #2:
1). Navigate to your website using your browser.
2). Replace the URL in the browser to reference the Kudu companion site for your web site. For example, if your site is contoso.azurewebsites.net, change the URL to contoso.scm.azurewebsites.net.
If prompted to authenticate, sign-in using your Azure Subscription credentials.
3). From the Kudu menu, select the Debug Console -> CMD option.
4). Click the download link for the site folder. This will package the site up into a .zip file and start the download.
5). Extract the .zip on your local hard drive and you're on your way.

Related

Azure Web App FTP permission is denied and cannot upload files and cannot create folders

I'm managing small web app, deploying with (always) FTP. My teammate requested me to upload a folder including small teaser website. As usual routine, I opened the Azure Web App Deployment Center FTP dashboard and copied server address and credentials and pasted them into FileZilla(latest version). Login went well and I could see file list and folders. However, when I tried to upload files, remove existing files, all of the writing attempts failed with 550 Access is denied error. What could be the cause of this?
On the other hands, I could remove existing files on KUDU debug console.
I check the ftp link the deployment center provide, looks like the portal provides a read-only ftp link. So go to your web app, click Get publish profile, choose the publishUrl under tag profileName=<yourwebname-FTP>.

How to make changes in an Azure App Service, when you have lost all the local data of the project?

I've been working in a web page and I´ve already upload that page as an app service in azure, but my local machine has crashed and I have lost all my local data, and I don't know how to make new changes into my web page.
I already access to my azure account from visual studio, and I can see my source code, but the changes are no getting stored into the live web page.
I already access to my azure account from visual studio, and I can see my source code, but the changes are no getting stored into the live web page.
According to your description, if you just want to change and store the codes in the azure, I suggest you could access the source code by using Kudu tools.
You could open it by add "scm" in the websites url like below:
http://{yourwebappservicename}.scm.azurewebsites.net/
Then you could click the cmd button and you could find your project files like below:
Then you could locate your web sites files as below path.
site-->wwwrot-->youfiles
If you want to change its content you could click below button.
After changing the file's code, you could click the save button.
If you want to change the code and rebuild the application, you could only download the code to the local.
One way is using FTP to access the azure folder and copy it to local.
Another way is you could clone the whole web sites form the azure to your local visual studio by using VS team explorer.
Besides, I suggest you could use some online source code tool(Like GitHub and VSTS) to help you manage your projects.
More details about how to use local git to clone the whole application to local, you could refer to below steps.
1.Fistly set your deployment username and password.
2.Enable local git:
3.Find the git url in the overview.
4.Open the teamview explorer in the VS.
5.Copy the gir url and click clone button.
6.Then it will show the windows to type the deployment username and password in step one.
Then you could double click the local git, you will find all files are clone to your local.

Web service migration from Local IIS to Azure

I Used Azure Website Migration Assistance to migrate my web service that was running on my Local VM's IIS. My Migration process was successful and also I was able to use this web service. But I can't find where to find the migrated source code in azure portal. All I can see is some 20Mb of data in on the dashboard graph of azure portal. If I need to changed some of my code where to do this?
What is on the Azure Web App should now match what was on your IIS server. Now, to update the web app, you can use the deployment techniques here: https://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/
The simplest method to deploy to check what content is on your web app would be to use the SCM site. This is available at: https://your-site-name.scm.azurewebsites.net. Go to Debug Console > CMD and then the site > wwwroot folder to see your web app content. You can also upload to the site via drag and drop.
Alternatively, you can download the publishing settings for your web app via the portal and then re-use the migration tool, select the site, and then upload the publishing settings. However I would suggest using the deployment techniques above first. (Disclaimer: I wrote the migration tool.)
There are multiple ways to push changes to your Azure Website/Web App. They are listed here: https://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/
One simple way is to use an FTP client like FileZilla. In the classic portal, you will find the FTP address (hostname) and the credentials in the dashboard tab. In the new portal, select your Web App and the FTP address will be displayed in the Essentials section at the top of the page. Click on Settings and Deployment credentials to set your FTP user password.
Another simple alternative is to use Dropbox. Take a look at this video for how to set instructions: https://channel9.msdn.com/Series/Windows-Azure-Web-Sites-Tutorials/Dropbox-Deployment-to-Windows-Azure-Web-Sites

Can you replace selected files in an Azure Website without deploying the whole Website?

When I check in my modifications to Visual Studio Online, an automatic deployment of the Azure website is done.
Is there a way to just replace some files in the Azure website, without deploying the whole website?
You can login to the site via FTP. Or you can use ServerExplorer in VisualStudio 2013 and modify files there:
You can also use the Kudu Debug Console to change files in your site. Go to http:// [yoursite].scm.azurewebsites.net/DebugConsole and log in with your FTP credentials
If you have publishing profile for azure loaded in your website then It is possible to select just your aspx pages(for design changes) .Right click aspx page and publish.
In case of code changes,full project must be published as code goes into dll's.

Is there any way download source code from "cloud services" in Windows Azure?

I don't have the latest version of the code deployed in the company's Windows Azure account, and I need to provide a fix to it. I know this can be done with "Azure Web Sites", but I'm not sure it's possible with "Azure Cloud Services".
Can anyone help?
If you did git deployment of the cloud service, you could fetch from the remote the same way you could with Windows Azure Web Sites. You may have updated the cloud service by uploading the package to blob storage first, in which case you could get the package. But, the package is not source code.
From a process perspective, you should label your deployments with a tag that can be matched in source control. You never know when a "hotfix" needs to be added to a branch off of the current production code.
In Windows Azure Cloud Services, instances are uploaded in the form of .cspkg packages.
According to the documentation, the Get Package operation retrieves a cloud service package for a deployment and stores the package files in Windows Azure Blob storage.
You could then download and extract this package (it is in ZIP file format) to retrieve its content. See this answer for more details.
In the case of ASP.NET applications, that will be a mixture of text files and binary assemblies (.DLLs). In the case of Java, it will be .jar files. You could use the appropriate decompiler to retrieve an approximation of the original source code. But it probably wouldn't be safe to change this reverse-engineered source code and upload it back into production, at least not without extensive testing.
yes. you can download it with an ftp client.
Ggo to dashboard of your site on https://manage.windowsazure.com.
Get credentials (username , password, host) and connect with you preferred ftp client.
Well, Azure now had a new portal and things are bit different. I had to retrieve the code for one of my websites.
To download the code,
go to App Service. In Overview panel, download publisher profile.
Now go to Deployment credentials panel. Enter the username for FTP and choose a password.
To connect to ftp, you need the URL from publishing profile (example.PublishSettings).
Now fire up your FTP client (FileZilla in my case) and put the FTP address and put the username like sitename\ftpusername (example\ftp-exmaple-user for me) and put in the password you choose in Deployment credentials panel.
wwwroot contains your code!
I realize it's an old question, in case anyone else needs it... I use the Cloud Explorer in Visual Studio 2017. In the Cloud explorer, you can drill down Subscription -> Resource Group -> App Service -> Files. Then, at the bottom of the Cloud Explorer, click "Download Files as a Zip."

Resources