Reputation: 11326
My understanding is I can I have many roles per hosted service: http://msdn.microsoft.com/en-us/library/windowsazure/gg432976.aspx, so why am I told:
when I want to publish my Worker Role to the same hosted service as my Web Role??
Update: I tried it anyway and it ended up replacing my Web Role.. :( How am I suppose to publish my Web Role and Worker Role to the same hosted service? Preferably from Visual Studio
Upvotes: 2
Views: 738
Reputation: 71121
A hosted service is basically the home for your app, at .cloudapp.net (or you can map a custom name to it). You then publish to this home. If, in the future, you have a code update, you re-publish. And you may update (leaving IP address intact) or delete+replace (not needed or recommended typically).
Now: What you're doing (I believe) is adding a 2nd role to your already-published hosted service. You may do this, and you may also upgrade without delete+redeploy. Essentially the entire package gets re-uploaded (not just the new role), and the two roles will then comprise your hosted service.
This will hopefully all make sense after you publish a few times. Be sure to enable upgrading (I can't recall where the option is - not in front of my dev machine right now). I believe the latest 1.6 SDK handles in-place upgrades by default. Not being in front of my dev machine, I can't recall how everything looks when upgrading, but it should be doable from Visual Studio. It most certainly is via the Windows Azure portal.
Upvotes: 3