Azure Deploy multiple projects on single web app - asp.net-mvc

I have three different projects, I have to deploy these projects under single web app with different sub domains. I already purchased the custom domain. To deploy these project I have created three directories.
I have also setup the virtual directories in the app settings.
The domains are also set
And I deploy the web part like this.
Now when I'm trying to access the web sub domain its showing me the default azure page
How can I access the projects on the basis of sub domains.

So I got an idea from Nancy comment. So you just have to update the virtual applications and the directories as follows.
Now I can access the web using https://web.example.com/ Thanks #Nancy.

Related

How do I split an Azure Web App Service into multiple 'sub web app services'?

I have a large monolithic Azure Web App Service (written in C# ASP.NET MVC5), comprised of a few discrete subapps that have little to do with one another other than sharing a domain name.
I'd like to split the monolithic webapp into several 'subservice' web apps: separate projects, with new projects potentially being in a different langauge (eg. nodejs).
It seems like I'd need a master Azure webapp that serves as the router? Or is there a better approach?
So e.g. if a request comes to http://www.example.com/subapp1, it should be served by SubApp1, but a request to http://www.example.com/subapp2 should be served by SubApp2.
Is there a recommended way to achieve this with Azure Web App services?
You can use virtual directories to do the division. This blog post has a good overview of how to set-up and deploy virtual directories for web apps:
http://blogs.msdn.com/b/tomholl/archive/2014/09/22/deploying-multiple-virtual-directories-to-a-single-azure-website.aspx.
Essentially, you would first create the main site and publish to it. Then using the portal, create the virtual directories. Then, for individual projects you can publish to each of those virtual directories.

How to deploy a single multi tenant MVC application to multiple Azure virtual directories

I have a single MVC.net web project that will be deployed for multiple customers
The code base and database structure is identical for each customer however on deployment, different CSS and images are used giving each customer their own look and feel.
Each application needs to have the same root url, mydomain.com. I would like to be able to configure so that when a user navigates to mydomain.com/site1 then they are shown customer A's specific deployment of the application. I would also like these deployments to be running on separate app pools (or similar).
mydomain.com/site1
mydomain.com/site2
mydomain.com/site3
I'm currently deploying to an Azure cloud service and using SQL Azure for the database (one DB shared by each cloud service).
How can I setup the above structure using Azure cloud services and ensure that all our customers can use the same root URL but have different complete applications for all of the multiple sites?
Can this be done using virtual directories on an Azure cloud service?
If not, what would be the best way of achieving this?

Two azure websites (webapps) on same domain

I have a webapp running as an Azure website on http://www.example.com
I have controllers for www.example.com/signup and www.example.com/signin - all other stuff is put on subdomains, like username.example.com.
My question: is it possible to have another (azure) website running on http://www.example.com? E.g. with all the marketing pages etc.
Ideally I would like to give access to that second website to an external webdeveloper so that I don't have to worry that the webdeveloper have access to my main app.
Additional question: would that second website have to be asp.net? Could it be PHP? (e.g. a Wordpress site)
You can develop child projects within Azure Websites check here : A single web project hosting both the web pages and API
One web project for the web pages, and another for the API, deployed to different websites on different servers
One web project for the web pages, and another for the API that is deployed to the same servers as an IIS application (/Services). http://blogs.msdn.com/b/tomholl/archive/2014/09/22/deploying-multiple-virtual-directories-to-a-single-azure-website.aspx, not sure if it can use another platform.

Issue with Azure-TFS build in the case multiple websites in single webrole

I have been using and publishing multiple websites in single web role without any issues.
Then I tried implementing continuous delivery with Team foundation service as mentioned in
http://www.windowsazure.com/en-us/develop/net/common-tasks/publishing-with-tfs/
But the problem started when i tried to use
(azure)TFS builds. The build always fails when compiling the secondary site.
There are no issues when manually packaged and deployed or packaging and deploying using powershell scripts.
Earlier to overcome the issue of secondary sites not publishing I used the solution mentioned in this blog michaelcollier.wordpress.com/2013/01/14/multiple-sites-in-a-web-role/ and it worked fine.
Now TFS builds fail with or without this hack.
When I checked the build drop folder I noticed that the TFS builds create a folder only for the web role and not for the secondary sites and when the build script looks for that folder of secondary website it fails as there is none.
Any solution for this issue is welcome.
More info--
This is a cloud service and not an azure web site. This web role is part of set of worker and web roles which are deployed together in a deployment.
I used the AzureContinuousDeployment.11.xaml template.
I configured the Deployment Settings Name as the cloud service name.
And filled in the details of Step 5 - Publishing -- Azure Cloud service as per my deployment setup.
I left the step 6 - Publishing Azure website empty as this is not an azure website.
The error anyway is happening during the build of the web role with the secondary website .
Error format
: Cannot find the physical directory 'C:**Secondary Website Project Name**' for virtual path Secondary site name configured in Service definition file./.
It appears that VSO does not support deployment of multiple websites to an Azure Web Role.
Confirmation here by Trevor Hancock.
I went ahead and suggested it as a new feature here.
This solution is working pretty well for me. It allows you to use TFS build to publish multiple sites in a single web role.
http://blogs.msdn.com/b/davidhardin/archive/2013/01/18/building-and-packaging-virtual-applications-within-azure-projects.aspx

Can I store a clients website within my website

I'm working on a clients pre-existing web site. I would like to take the solution they sent me and host it within my web site so that I can make changes to it and the client can see them without modifying their current live version without their approval.
It would be nice to store on a sub domain. How do I contain the web site within a folder so that it doesn't conflict with my web.config and other files?
All you are talking about is taking their files and hosting them on a domain of your choice ... this is generally deemed a Dev Site. Nothing fancy here, just create a IIS directory or application for the client's version of software on your server machine and map your domain to it via DNS settings.
Here is an article on creating sub domains
http://forums.asp.net/t/874598.aspx

Resources