我正在尝试将http到https重定向规则添加到我的azure web角色web.config文件中,但是当我添加它时,它会给出我在图像中可以看到的错误。我发现规则行是造成这个错误的原因。 我能做什么?
Servicedefinition.cscfg:
答案 0 :(得分:0)
您的云服务定义是否在本地设置了HTTPS。错误表明你没有。因此,我将使用web.config转换,以便我的本地运行的实例没有重定向和云部署,或者使https在本地调试中有效,以便调试器连接到HTTPS。我假设您的定义中同时包含http和https端点。
答案 1 :(得分:0)
最后我找到了原因。关于天蓝色的事情并非如此。此规则还重写了debugattach.aspx的路径,这就是visual studio无法启动调试的原因。为解决此问题,我添加了以下规则:
<rule name="debug" enabled="true" stopProcessing="true">
<match url="^debugattach\.aspx" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="None" />
</rule>