Cloud Cover Episode 31 - Startup Tasks, Elevated Privileges, and Classic ASP

Play Cloud Cover Episode 31 - Startup Tasks, Elevated Privileges, and Classic ASP


Join Ryan and Steve each week as they cover the Microsoft cloud. You can follow and interact with the show at @cloudcovershow.

In this episode:

  • Learn how to use startup tasks in your web or worker role.
  • Learn how to enable Classic ASP with an elevated startup task.
  • Learn about the PDC 2010 announcements.

Show links:

Windows Azure - You spoke. We listened, and responded.
Windows Azure - Want to Know More About Windows Azure News from PDC10? Here's How!
Introduction to Windows Azure AppFabric Caching CTP
SQL Azure - PDC 2010 Announcements
Cloud Cover on Channel 9 Live from PDC 2010 (skip to 5:38)



Download this episode

The Discussion

  • User profile image

    Good show! I have two questions I would like answered:

    1. How is internet connection redundancy done in Azure? On my on-premise datacenter this is done by having two separate ISPs with different IP-ranges. The problem then is that it takes like 60 min to update the DNS entries if the primary ISP goes down and I need to emergency-switch to the secondary. See where I'm getting at?
    2. The new "Azure connect" and what-not is a bit confusing, will Azure finally have static IPs? The reason I'm asking is that a lot of my connections require fixed IP-addresses over tcp/ip.
  • User profile image
    Dom Lawson

    Another good show - I have a question around the failed installation issue you mentioned.
    If you fail to install some piece of software in your start up task, and then someone else gets your VM after recycling  (is this what really happens) - do they see the VM in an inconsistent state?  Or does the VM state get reset when it is recycled to another user?  Maybe I misunderstand the way recycling works but the comment about checking whether the package has already run suggests that the VM survives recycling.
    It would be good to get some clarification how Azure handles this - future cloudcover show maybe?

  • User profile image

    Excellent episode!

  • User profile image

    Was wondering why a general startup task rather than a 'role first run' task and and 'start up' task.

  • User profile image

    @hansol: I'm not sure what you mean by "internet connection redundancy."  Are you talking about what happens if a Windows Azure data center goes down?

    No, Windows Azure Connect doesn't add support for static IP addresses.

  • User profile image

    @Dom Lawson: Your role can recycle on the same VM (just a VM reboot or just restarting your role's process).  No one else will ever be on that VM (because anyone else coming along will get a new VM).  That's an important security/isolation feature.  All we were talking about is if your code fails to install something and then is restarted.  In that case, you'll be on the same VM, and it will be in a weird state.

  • User profile image

    @PerfectPhase: You're suggesting a task that only runs the first time a role is started on a VM?  (In other words, the second time it would be skipped?)  I think the reason not to do that is that there's no way for us to tell that the task has succeeded... if something failed, you'll want to rerun the task.  Hence the design where we run the task every time the role is started, and it's up to you to detect when you should just return without doing anything.

  • User profile image

    @smarx: What I mean with "Internet connection redundancy" is: How is connectivity out to the world done in Azure? My cloud-webapp in points to an ip-address at the azure data center. What happens if your ISP goes down? Like the main cable is cut from the azure datacenter my app is hosted on or something like that. Did that clarify my question?

  • User profile image
    Dom Lawson

    @smarx: Steve - thanks, much clearer now and having done some more research how VM's are provisioned in Azure, differencing disks etc.  Something that did occur to me, is there a possibility a new user's VM gets deployed to a machine that used to host another user's VM.  In their local storage they are allocated disk space that housed the previous users local storage and they then use low level file API's to read pages from the previous VHD that occupied that storage?  This might be tricky with pure .NET but with the new VM role it would be easier.
    Guess this is unlikely but is this a potential breach of the VM/storage separation principle?

  • User profile image

    @hansol: our datacenters are sourced with multiple internet providers for redundancy.  It would be a catastrophic disaster in order to lose all connectivity.  In that case, you would need to move your services to another datacenter while it was recovered.

  • User profile image

    Thanks for the excellent and entertaining show. 

    One item about Startup Tasks to socialize:  Where to stash the executable in the SLN / projects?

    I have a SLN project 3 projects, an ASP.NET web application, a Web Site and a Cloud project.  The Cloud project contains the ASP.NEt web app as a web role.  The Web Site is not targeted to the cloud. 

    My startup-task is a CMD file.  I had tried adding that to my SLN in a Solution Folder I'd created.  That produced a build time error about approot\bin.  Huh?

    I ultimately resolve the issue by adding my CMD file to my ASP.NET project, gave it a Build Action of 'None' and a Copy To Output Directory option of 'Copy Always'.

    That works for this simple (one role) case.

    Haven't found any documentation on this as yet.  It'd be helpful to know the rules; specifically what are some of the right "places" for the Startup Tasks to live?.  If this was a multi-role project, would any of the role's 'Output Directory' folders have worked?  Can you supply a Post-build event to the Cloud Project to copy the Startup Task executables to ... where?

    Hopefully, you get the idea.

    Thanks much.

  • User profile image

    @HowardHoffman - I'm working on a Blog Series right now and it relies on Start-up Tasks.

    I'm using the cspack command-line tool in order to build my Cloud Service Package and it asks to place the Start-up commands into a bin folder in your deployment. $approot\bin

    I am trying to avoid using an IDE for this series, so I can't comment on how to handle this in visual studio yet, but i'll be sure to update you with a new comment here when I get the blog series up and when I have the chance to check out the Story in VS.


    Cory "SyntaxC4" Fowler




  • User profile image

    Thank you for sharing your article I would always follow.

  • User profile image

    very nice pictures is also very lively and attractive you look .every one who wanted to congratulate you You look super. Ankara evden eve nakliyat A wonderful picture, and always such a special and very attractive as well stay beautiful ok
    Ankara nakliyat
    Evden eve nakliyat

  • User profile image

    Hi used start up tasks in my asp application while migrating into azure, now i'm facing a issue i used xcopy to copy a folder form package to phsyical location c drive..... when i evr i restart my machine my application is gettng down, i could not see in iis when i remote login to my cloud vm. And i raised a issue with support team, they said it was the issue with xcopy start up command which is not allowing the instance to start, but the thing is will these start up tasks run even on restart?????? and any solution to my prob.. but when i manually run my xcopy command in cloud vm it is running fine, not showing any errors

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.