How to get .publishsettings for Web Deployable Web Role? - azure

I enabled the Web Deploy feature for my Web Role and deployed it.
But how can I get hold of the .publishsettings file so I can create a Publishing Profile for it?
This 2 year old article states that it should have been created automatically, but I haven't got that in my profile manager.
Any ideas?

If you are using Visual Studio 2012 or greater, the server explorer to the left will have several Azure items.
Specifically the Windows Azure Compute is what we are looking for, right click on that and say 'add deployment environment'. You will then be prompted with a dialog that allows you to sign in and download publish settings file:

You can get publishsettings file from the following link: https://windows.azure.com/download/publishprofile.aspx

Well, the problem was really behind the keyboard.
So the publishing profile is actually provisioned correctly and automatically to the Web project as the documentation states.
The problem and confusion was that I have a secondary web application in my Solution that I also publish to the same Web Role (referenced as an additional Site in the ServiceDefinition.csdef file).
That Web Project does not get the Publishing Profile, and when I try to create a profile manually, it doesn't work since that (secondary) IIs instance is not configured for Web Deployment.
Oh well, back to the tedious Cloud Service deployment it is...

Related

Mobile App backend does not show in existing Web Apps

I'm following the procedure to create a Xamarin app with a mobile app backend in Azure.
https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-dotnet-backend-xamarin-android-get-started-preview/
I've create the mobile app in the portal and downloaded the backend runtime and xamarin solutions. When I try to publish the backend runtime, the instructions indicate that the one I just created should show up 'Existing Web Apps'. Mine shows nothing.
My questions are:
1) How can I troubleshoot what shows up in the 'Existing Web Apps'?
2) Is it reasonable to just create a new web app from the VS Publish dialog?
3) If not, where should I place the publish profile that I can download from the azure portal?
Regards,
Rajesh
1.a. Ensure you're using the right azure suscription from VS
1.b. Logout and add your subscription login again
Yes it's reasonable
You can put it wherever you want. From VS website project goto publish settings
4. Then select import
5.And Finally browse the publish settings file
I have had issues with Visual Studio finding the existing apps. I tend to download the publish settings and use that instead. This works fine.
Alternatively, create a git repository and check the code into the git repository. Check out this article for instructions: https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/
Personally, I post my code to a branch of my git repository on GitHub and link the continuous deployment option of the Azure App Service to that. You can find my blog about this topic here: http://shellmonger.com/2015/08/29/continuous-deployment-nodejs-and-microsoft-azure/ - it's for NodeJS but the concept and methodology is the same.

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

Azure: Is there a way to view deployed files in Azure?

Is there a file "view" available in Azure?
When I log in to Azure to look at a website I've deployed there is no obvious see exactly what files Azure is hosting.
I can see there's the Visual Studio Online option which allows you to live edit your server code but that is more than I need. I just want to be able to check that certain files are deployed and others are not.
If you're just trying to look around, and see the various directories and files in your deployment, you can enter the site's "Kudu" dashboard, using the url format http://<yoursitename>.scm.azurewebsites.net
This will give you a web-based dashboard, including a debug console (web-based) where you can explore your various directories (and the directories will show up visually as well).
More info can be found in this post from the Azure Websites team.
In Visual Studio, in the window "Server Explorer" you click and connect on "Azure".
=> App Service
=> Your site name
=> Files
Here you see all your files and you can edit them directly in Visual Studio.
##### UPDATE 19/08/2019 #####
For some time now, it hasn't worked anymore.... :(
Here is another way to do it: By FTP !
From the Azure portal, in the "App Service" section of your website, go to "Deployment Center" > FTP > Dashboard
There is the FTPS Endpoint => ftp://.....ftp.azurewebsites.windows.net/site/wwwroot
And username, password information.
Install FileZilla Client! (https://filezilla-project.org/)
Enter Host with "FTPS Endpoint" the "username" and "password" and then login quickly!
You can use App Service Editor (previously known as Visual Studio Online). It can be found under your webapp -> Development Tools section in the Azure Portal.
I know this is old, but I just found it, and got some useful tips from it. If you are using an App Service, there is now a browser option to do this as well:
https://YourAppService.scm.azurewebsites.net/dev/wwwroot/
You can get there from the Azure portal, then go to your App service, then scroll down to Development Tools, and click on "App Service Editor".
In VS2017/2019, there's Cloud Explorer to view files in Azure, but each time open folder to view files will invoke connection to cloud, so you have to wait, that's a bit slow.
To open Cloud Explore, Right click on project > Publish > Manage in Cloud Explore, or Top Menu > View > Cloud Explorer.
Yes, you have many options to see that
By clicking Console option (run "dir" command, will list down all files)
By hitting App Service Editor(Preview) option,
Adding to the accepted answer,
you can open an ssh session by going to http://<yoursitename>.scm.azurewebsites.net/webssh/host.
For a long time, I've looked for a linux-style terminal to view my deployed files and environment variables. With this you can view the files, check and set environment variables, make db migrations directly, and a lot more. Hope this is useful.
That could be relevant: AppService->Console
You can use Visual Studio Code and the Azure extension
Since you are using Azure Websites, Azure wants to "manage" it for you, and as a result, you cannot connect to the VM itself. If you were using a Cloud Service, you can obtain the RDP information from the Azure Console and just remote into the machine.
For your situation, you can use FTP as an option. Here is blog that describes one approach:
http://blogs.msdn.com/b/avkashchauhan/archive/2012/06/19/windows-azure-website-uploading-downloading-files-over-ftp-and-collecting-diagnostics-logs.aspx
Here is another option using WebMatrix:
http://www.microsoft.com/web/post/how-to-edit-a-site-hosted-on-windows-azure-with-webmatrix

Azure Cloud Services - Publish incremental changes only

I have a C# ASP.Net MVC4 Web Role deployed on Windows Azure Cloud Services using Package and Publish. First time it uploaded entire package and site has been running fine. When I wanted to publish the next set of changes, the Publish option is trying to upload the entire package again.
I have already configured Remote Desktop and Web Deploy and also enabled incremental updates as per guidelines stated in the article Publishing a Cloud Service using the Windows Azure Tools.
But this seems to be not working and Publish is trying to upload entire package again and again. Has anybody faced this issue and come up with any fix?
Nope.
currently there is no out-of-the-box solution to support incremental changes deploy.
When working with Cloud Services I highly suggest that you do not use Web Deploy for anything else than development/testing. The reason is that all changes made via web-deploy and any other non-full-package-upload process will be wiped out as soon as an instance in being recycled/healed.
I've been working on a project to allow rolling out partial changes. Unfortunately it only supports update to the "bin" folder currently. You can take a look at this project here. It is a good starting point at least.
For quick publish incremental changes to development environment (Not recommended for Production), check - Speed Up Azure Deployments with the New Web Deployment Feature.
In VS2013, choose 'Deploy' from the context menu of the Web App project which is referenced by the role (and not the 'Cloud Service' project referencing the role(s) ... doing that will publish the whole service and all of its roles non-incrementally).
There should be a 'publish profile' which refers to the website on the *.cloudapp.net platform. If there is, it was put there by Visual Studio ... probably when you first ticked the 'Enable Web Deploy for all web roles' check-box when first deploying the service.
However, it might not be there, or be wrong. Because, for example, Visual Studio is dumb, and noticing that you had already published the Web App as a 'Web Site' (before you decided to incorporate it as a 'Web Role' in a service), it decided to leave the existing entry for *.azurewebsites.net alone. Or is it because that project was only included in the role as an <VirtualApplication /> element in the service definition's XML, and Visual Studio just neglected to create it?
So you'll have to find some way to force Visual Studio to re-create the right profile for you, or you'll have to manually copy and edit the publishing profile XML files from a known good source (Properties/PublishProfiles directory under the project root), or just guess the settings from absent documentation.
Those settings will be something like:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<MSDeployServiceURL>https://MYAPP.cloudapp.net:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>INSTANCE</DeployIisAppPath>
<RemoteSitePhysicalPath />
<AllowUntrustedCertificate>True</AllowUntrustedCertificate>
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<DeployAsIisApp>False</DeployAsIisApp>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<UserName>MYUSER</UserName>
</PropertyGroup>
</Project>
Where:
MYAPP - is the domain name of the deployed Azure service
INSTANCE - is the name of the instance you want to update (get it from Server Explorer ... it's the 'Name' property of the 'Instance' under your service ... or get it from the list of instances comprising your service from the Windows Azure management dashboard).
MYUSER - is the name of the user you set up when publishing initially, for the Remote Desktop Services

Deploy separate web sites azure

I have a single web project that I want deploy in Azure.
I want to create one IIS web site per country and I want to be able to deploy each web site independently (not all of them at a time). How to do this?
Well,
you have two options:
Use Windows Azure WebSites to host your websites
Use Windows Azure Accelerator for WebRoles or your own project similar to that approach.
However you have to note that the second option is a project that is no longer being supported due to avialability of Azure Websites. With Azure Websites, you can have almost everything you get with the Accelerator. You can host your websites on a dedicated instances, and manage them individually. You can update/deploy your website data via FTP/GIT/TFS/WebDeploy, whichever method you are most happy with. The only downside of websites which I see, is the lack of Startup Tasks and the ability to customize your environment (Windows, IIS settings, etc).
When you have set up your Azure account you can go the the web sites section and start the construction of your Azure web spaces, the interface in the preview is very straight forward to use and intuitive.
For deployment using the publish command in from Visual Studio 2012 (which I found the easiest) here are the steps you will need to undertake:
For each of your countries you will need to set up the web site
in azure.
Then for each of those web sites you have created go
to their dashboard page and download the publish profile settings.
It is these settings that you can import into you Visual Studio
solution by selecting the publish command and browsing for the
settings profile file you downloaded and importing it.
Then in future when
you right click on the web site in your solution and select publish
it will publish to your web site in Azure.
I have created a fictional website for Spain below is the link you will need in order to initiate a publish from Visual Studio.
------------ EDIT -------------
For Visual Studio 2010 I met some difficulties trying to publish, in fact the publish profile you can download was not importable to Visual Studio 2010, well at least I could not figure it out.
Instead I created a deployment user by clicking on the 'Reset Deployment Credentials' link on the Azure dashboard (see the link in the image), created the user and then published via FTP from Visual Studio 2010.
What I would like to flag up is the maintenance issue of having one site for each country rather than one site with Localization, (if it is a language issue). A small change multiplied just 20 times for 20 different countries becomes a larger task and if you have lots of little changes it soon becomes a large task to maintain them all.

Resources