我有一个工作部署。我已添加到云服务角色的配置文件中:
<Startup>
Task commandLine="EnableCompression.cmd" executionContext="elevated" taskType="simple"></Task>
</Startup>
然后在cmd文件中:
%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
将此发布到 Azure 时,我得到:
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.
Cmd 文件具有 COPY ALWAYS 属性。所以这应该没问题。从配置中删除<Startup>
标签时,它是成功的。
以上似乎未能部署
这可能是什么原因?谢谢!