0

I have a web API that is hosted in Azure. Because of the fact that after 20 minutes of inactivity IIS goes to sleep, I also added a startup script that removes this timeout, so that IIS stays awake. As specified, this file should be saved as UTF-8 without signature, otherwise it is not run on Azure during deployment.

This all works fine the first time.

The problem is that every time we close Visual Studio and reopen it, it seems to forget that the startup file is saved as 'UTF-8 without signature'; it always reverts it to 'UTF-8 with signature'.

I have tried is as described here (advanced save options) and also the fix file encoding extension, but nothing helps. The file is always back to 'UTF-8 with signature'. My collegue has exact the same issue.

As a result, before each deploy we first save the file again as 'UTF-8 without signature' explicitely, which is annoying.

In case it's relevant, our source code is hosted in Visual Studio Online.

Anyone has another idea we can try?

EDIT: just stumbled on Azure Web Role "warm up" strategies, maybe I can try one of these alternatives.

Community
  • 1
  • 1
L-Four
  • 13,345
  • 9
  • 65
  • 109
  • 1
    Not related to UTF-8, but if your API is hosted in a standard Azure website, are you aware of the "Always On" feature? With this enabled, Microsoft will automatically make a HTTP request to your site regularly to keep it alive. – Alan Jan 13 '15 at 14:50
  • if it is hosted on Azure Web Site there is no statrup task, so no script or whatsoever! – astaykov Jan 13 '15 at 14:52
  • @astaykov: It's hosted on Azure as a web role, and so the startup script works fine if saved in UTF-8 without encoding. – L-Four Jan 13 '15 at 14:59
  • @Alan: I was not aware of the 'always on' feature, I will have a look at that, did not see it before. EDIT: as we use a web role, it's not possible it seems... – L-Four Jan 13 '15 at 14:59

0 Answers0