我的web.config(MVC 5)中有以下重寫代碼,顯然導致流量管理器註冊「降級」,因爲它獲得重寫(301狀態,I疑似)。我已設置流量管理器來監視HTTPS。我還需要做什麼?由於https重寫規則導致Azure流量管理器日誌降級
<system.webServer>
<!-- http://blog.smarx.com/posts/redirecting-to-https-in-windows-azure-two-methods -->
<!--<rewrite>
<rules>
<rule name="Redirect to HTTPS" stopProcessing="false">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
<add input="{URL}" pattern="/$" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Redirect" url="https://{SERVER_NAME}/{R:1}" redirectType="SeeOther" />
</rule>
</rules>
</rewrite>-->
<validation validateIntegratedModeConfiguration="false" />
UPDATE這可以在我家裏控制器配合工作:
/// <summary>
/// For Azure Traffic Manager Monitoring /Home/TrafficManagerProbe
/// </summary>
/// <returns></returns>
[HttpGet]
[AllowAnonymous]
public HttpResponseMessage TrafficManagerProbe()
{
return new HttpResponseMessage(HttpStatusCode.OK);
}
謝謝。這也可能起作用:請參閱更新信息。 – GGleGrand
是的,看起來不錯 –