Oybek
Oybek

Reputation: 7243

Changes in Windows Azure web role via remote desktop are not propagating

I have deployed a web role on Windows Azure. It runs on one instance only. I set up the remote desktop to access it.

At the moment I need to change only two lines in a JavaScript file in the website.

I connected to the instance then ...

  1. navigated to the E:\approot\Scripts
  2. opened the target file, edited it

Changes didn't propagate. (I download the old content)

Then I tried to

  1. Stop the IIS in web role
  2. Edit the file
  3. Start the IIS again

Changes didn't propagate (When I open the file in the RD I see my new content, but when open via http I see the old content)

Then I tried

  1. Opened RD
  2. Navigated to the file and edited it
  3. Rebooted the instance via Windows Azure control panel
  4. Again connected to RD

I still see the old content in the remote server

My question is what I should do in order to change only one file without redeploying the whole package?

Upvotes: 1

Views: 494

Answers (3)

agradl
agradl

Reputation: 3536

You should be able to do a web deploy by right clicking on your website project (not the azure role project). This will only deploy files which have changed to the active instance. I believe there is a setting in your azure deployment profile (next to the remote desktop one) to enable this.

As noted in other answers these changes are lost should azure need to recreate or provision additional instances. Still, it is a great way to make incremental changes for development.

Upvotes: 0

user94559
user94559

Reputation: 60153

My guess is you're editing the wrong location. Look in e:\sitesroot\0 (or something like that). When in doubt, open the IIS config UI and find out exactly where the website content lives.

EDIT: But as Dennis pointed out, changes you make this way don't persist, so use this only for testing.

Upvotes: 5

Dennis Burton
Dennis Burton

Reputation: 3333

I have had this work before, but there problems with this type of change. If something happened to the hardware you are running on and your instance needed to be 'healed', it will only be created from the package you uploaded. Azure does not know about the file edits you have made via RD.

There is not a way to make a single file change in side of a cloud service right now, but with the new Azure web site functionality it is just a git push or tfs push away.

Upvotes: 2

Related Questions