1

web.config (MVC 5) に次の書き換えコードがあります。これにより、書き換えが行われるため (301 ステータスと思われます)、トラフィック マネージャーが「劣化」を登録するようです。HTTPS を監視するようにトラフィック マネージャーを設定しました。他に何をする必要がありますか?

  <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" />

更新これは私のホームコントローラーで機能する可能性があります:

    /// <summary>
    /// For Azure Traffic Manager Monitoring /Home/TrafficManagerProbe
    /// </summary>
    /// <returns></returns>
    [HttpGet]
    [AllowAnonymous]
    public HttpResponseMessage TrafficManagerProbe()
    {
        return new HttpResponseMessage(HttpStatusCode.OK);
    }
4

2 に答える 2

1

あなたの疑いは正しいです。エンドポイントがオンラインであると見なすには、Azure Traffic Manager 正常性プローブが HTTP '200' を受信する必要があります。その他の HTTP ステータス (201、202 などを含む) は、劣化していると見なされます。リダイレクト (301、302 など) は追跡されません。

この記事には、劣化したエンドポイント ステータスのトラブルシューティング方法に関する詳細が記載されています。

于 2016-01-22T13:07:13.423 に答える
0

以下は、Https が必要な上記のケースで機能します。/Home/TrafficManagerProbe を、TrafficManager 構成ページの下部にあるモニター リンクとして追加するだけです。「劣化」ではなく「利用可能」と表示されるようになりました。

/// <summary>
/// For Azure Traffic Manager Monitoring /Home/TrafficManagerProbe
/// </summary>
/// <returns></returns>
[HttpGet]
[AllowAnonymous]
public HttpResponseMessage TrafficManagerProbe()
{
    return new HttpResponseMessage(HttpStatusCode.OK);
}
于 2016-01-28T10:54:06.120 に答える