Thoughts from Dan Miser RSS 2.0
# Saturday, 23 November 2013
Azure has been churning out features faster than anything I can ever remember coming out of Microsoft. I finally moved to Azure with my production apps this weekend. It was a pretty painless move, as far as data center moves go. One of the biggest road blocks that I hit was trying to create virtual applications for each of my apps inside one Azure Web Site. I wanted to go this way to get the benefits of having one DNS entry, coupled with an SSL certificate, and eventually wildcard subdomains. It seemed the smart way to go, given that each app is isolated and I've been running that way on my own IIS server for a couple years (or more) now.

The key to getting things right is to select your Azure Web Site in the portal, and go to Configure. Then, at the bottom of the page you can add your virtual applications. The placeholder text says "PHYSICAL PATH RELATIVE TO SITE ROOT". Don't listen to that. Instead, make your virtual applications live underneath site\wwwroot.


If you do that, you can then download the Publish Profile Settings from your dashboard and update the <DeployIisAppPath> element to look like this: 
<DeployIisAppPath>MySite/app1</DeployIisAppPath>
Now when you deploy, the files will land on the server in the right directory. 


I couldn't find a way to get the deploy to put the files in the site\app1 directory on the server. DeployIisAppPath and RemoteSitePhysicalPath could not get me up to that level in this setup. If you know of a better way, I'd love to hear about it!

Bonus: If you're a command line junkie like me, you'll want to read how to publish an Azure site from the command line.
Saturday, 23 November 2013 23:40:46 (GMT Standard Time, UTC+00:00)  #    Comments [1] -
.NET | ASP.NET | ASP.NET MVC
Friday, 13 December 2013 17:38:57 (GMT Standard Time, UTC+00:00)
I have been messing around with this a bit myself and I discovered that from the publish web dialogue in visual studio under connection you can go to the site name tab and append (for your example) app1 eg yoursite/app1 to publish a site straight to the virtual directory.



tjmcnaboe
Comments are closed.
Navigation
Archive
<2017 December>
SunMonTueWedThuFriSat
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456
Blogroll
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2017
Dan Miser
Sign In
Statistics
Total Posts: 388
This Year: 0
This Month: 0
This Week: 0
Comments: 630
Themes
Pick a theme:
All Content © 2017, Dan Miser
DasBlog theme 'Business' created by Christoph De Baene (delarou)