How do you host multiple sites in the same Azure standard instance? - azure

I am in the process of setting up a number of sites on our Azure subscription. I currently have one in standard and a few in shared. I would like to move the shared sites to the same standard package but there seems to be no way to do this.
When I navigate to the Scale tab of the web site configuration I see no option of adding other sites to the standard instance. All I see if
Web Hosting Plan Sites: [name of site]
With no option to add to it. Also, if I try to move a shared site to standard no drop down appears allowing me to select other sites to include.
Thanks

To add a website to the same hosting plan, click "NEW" in the command bar at the bottom of the azure management portal, choose to create a website and, in the "Web Hosting Plan" textbox, select your existing plan instead of creating a new one.
Once you do this, you can go in Scale tab and see your second website in the list.
To do the same thing in a Cloud Service instead of a website, see http://msdn.microsoft.com/en-us/library/gg433110.aspx

Related

Azure Active Directory Signin Apps Always Create Enterprise App with no ability to set replyUrls

In the past there was both the separate website AND the Azure classic portal for managing Signin Apps. In the Classic portal it would give you the ability to edit the ReplyUrls.
In the new portal no matter how you create an app (Enterprise or Application Registration) you can't edit your ReplyUrls from the UI. (With Application you can set them the first time but then they don't show up in the Application list from then on so it's impossible to edit them)
Meanwhile these same apps can have their replyUrls updated using Powershell without any problem.
To me this is a blocker bug, but maybe I'm doing something wrong? I've successfully gotten only 1 application to show up under application registrations. All others including ones created back in the Azure Classic day show up in Enterprise applications without even the Sign On Option showing up in the list of options for the application per the instructions on Microsoft's website.
I can private message an app Id as an example.
The user experience of the Azure portal changed for the worse (in my opinion).
I also had trouble finding my old apps... turns out they are now "hidden" by default.
they don't show up in the Application list from then on so it's impossible to edit them)
You will find them under "all apps".

How to get .publishsettings for Web Deployable Web Role?

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...

Deploying and maintaining multiple copies of the same web application at different URLs on Azure

I'm currently investigating the possibility of my company using Azure.
Our current hosting situation that we run ourselves involves a separate site in IIS for each of our clients, each one having a virtual directory to the CMS we've built with ASP.Net web forms. We can update the contents of that virtual directory, which then provides the latest version of our CMS to all our clients at once.
I'm not looking to recreate that exact situation in Azure, but I am instead interested in figuring out how to create a single Web application in Visual Studio, publish that application to Azure in such a way that multiple sites (that I've specified) are created on Azure. Then I would like to be able to make changes to that application, and publish it again in a such a way that all the sites for it get updated all together, without requiring something be done manually per site/client.
The closest explanation I've found is this one:
http://www.wadewegner.com/2011/02/running-multiple-websites-in-a-windows-azure-web-role/
That gets me close, but what I don't understand is that when I publish this application to Azure, I still only see one application / URL available in the Azure management console. Shouldn't the extra "Site" node result in a different site being available when I publish it? Why doesn't it? Is there a completely separate way to accomplish this that I'm not using?
When you look at the management console you're seeing the web roles that you have deployed, not the sites that are part of that web role which is why you're only seeing one. As long as you've followed the instructions correctly, then yes, you do have two sites running. The catch is that you can only access the main site through that default URL. Presuming you have urls that look like customer1.mysite.com and customer2.mysite.com, you need to make sure you've set these as the host headers in the sub sites and then change your DNS so both of these domains point to URL you can see in the portal (e.g. mysite.cloudapp.net).
When considering a multi-tenant solution, ideally you should design your web-application as a single website that is capable of responding to multiple tenants (each of your customers), as opposed to creating a website/web-application for each one of them. This makes updates across the system manageable.
Your web-application can partition and identity different tenants based on several options such as part of the url (e.g myapp/tenant1 vs myapp/tenant2) or via a host header (e.g. tenant1.myapp.cloudapp.net vs tenant2.myapp.cloudapp.net)
HTH

Change Azure Website Subscription

I had a free trial with windows azure, I was out of the country and it ran out.
I have now upgraded to a pay-as-you-go account. All good.
However, my previous websites still run off my old subscription, is there any way to reactivate these websites using my new pay-as-you-go subscription?
If you upgraded the existing free account versus opened a new pay-as-you-go account, this should have been a seamless transition.
You can contact support - use the Billing Questions option and then select Transfer Subscription, and they should be able to help you.
Alternatively, of course, you could redeploy your assets to the new subscription.
I created a "Billing" ticket with microsoft. There is a type of ticket as you go through their wizard specifically for this. They were able to upgrade my "Free Trial" to the pay as you go AFTER i had let the free trial expire. The downside was that all my virtual machines were deleted. It did however give me access to my websites and storage without any problem. I was able to recreate all the VM's using the storage vhd's.
My experience on this is that I just redeploy to a new website I created under new subscription. I didn't find a way to move them over to new subscription.
You can move SQL Azure to new subscription, but not website. To move SQL Azure to new subscription, you will need to use old Azure portal management. Follow this step:
http://blogs.msdn.com/b/windowsazure/archive/2012/03/07/moving-sql-azure-servers-between-subscriptions.aspx
Note that you are moving the server where the database lives. So, if you have more than one DB in the same server, everything will be moved.
You can move Azure SQL DB from one subscription to another on https://manage.windowsazure.com
Both subscriptions should in the same Default Directory. If they are in different directories then select:
Subscriptions
Manage subscriptions/directory
Select subscription and click "Edit" at the bottom.
Choose directory where other subscription and click "Next".
When both subscriptions in the same directory.
Choose "SQL Databases"
Select proper server
and in Quick Glance you should see "Change subscription"
The documentation in the link stack247 posted is now outdated. To change the target subscription for a database, you have to change the target subscription of the server for the database. There are several ways to navigate to the server, but here is just one example:
Click on the database tab
Click on the name of the database you want to change
In the dashboard view, click on the link to the server in the quick glance section. This is on the bottom right corner of the view.
In the dashboard view, click on the Change Subscription link in the quick glance section. This is on the right side of the view.
Change the Target Subscription, and click the check button.
As far as changing the subscription for a website or cloud service, I would do what is recommended above; and republish the website or cloud service. When you publish, change the settings to target a different subscription by clicking on the previous button.
---------Update----------
If you have a bunch of assets that need to be moved to another account, create a ticket with the Azure helpdesk. You will have to do the above and switch out the accounts for the databases/servers, but Microsoft is able to run a script on their end that moves everything. Depending on the size of your assets, it may take a little longer. Fortunately for me, it was only a day to move everything. I would recommend doing this instead of publishing everything a second time.
https://manage.windowsazure.com/?getsupport=true
All the solutions mentioned above are now outdated.
In the https://portal.azure.com/,
For SQL Servers, go in the "SQL Servers" menu, select the server to change. In the Overview, click on the Edit button, located right to the name of the subscription.
For WebApps, go to the "App Service plans" menu, select your plan, click on the Resource Group and in the Overview, click on the Edit button, located right to the name of the subscription.

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