I have a working deployment. I've added to the configuration file of a Cloud Service Role:
<Startup>
Task commandLine="EnableCompression.cmd" executionContext="elevated" taskType="simple"></Task>
</Startup>
Then in the cmd file:
%windir%\system32\inetsrv\appcmd set config /section:urlCompression /doDynamicCompression:True /commit:apphost
%windir%\system32\inetsrv\appcmd set config -section:system.webServer/httpCompression /+"dynamicTypes.[mimeType='application/json; charset=utf-8',enabled='True']" /commit:apphost
When publishing this to Azure I am getting:
Your role instances have recycled a number of times during an update or upgrade operation. This indicates that the new version of your service or the configuration settings you provided when configuring the service prevent the role instances from running. Verify your code does not throw unhandled exceptions and that your configuration settings are correct and then start another update or upgrade operation.
the Cmd file has COPY ALWAYS attribute. so this should be fine.
When removing the <Startup>
tag from the configuration it is successful.
the above seems to fail the deployment
what can be the reason for this? Thanks!