0
現在、WebアプリケーションとしてazureでホストされているASP.NET MVCのWebアプリケーションで作業を開始しました。私は展開スロット(ステージングではなく、プロダクションスロット)を作成し、ホワイトリストに記載されているものを除いて、すべてのIPアドレスからそのスロットのアクセスをブロックするために何をすべきかを知りたいと思います。Azureデプロイメントスロットホワイトリストip
私はWeb設定からこの部分のコードを追加して試しました。
<rules>
<rule name="Block unauthorized traffic to staging sites" stopProcessing="true">
<match url=".*" />
<conditions>
<!-- Enter your staging site host name here as the pattern-->
<add input="{HTTP_HOST}" pattern="^mysite\-staging\." />
<!-- Enter your white listed IP addresses -->
<add input="{REMOTE_ADDR}" pattern="123\.123\.123\.1" negate="true"/>
<!-- Add the white listed IP addresses with a new condition as seen below -->
<!-- <add input="{REMOTE_ADDR}" pattern="192\.255\.42\.2" negate="true"/> -->
</conditions>
<action type="CustomResponse" statusCode="403" statusReason="Forbidden"
statusDescription="Site is not accessible" />
</rule>
</rules>
しかし、展開上、それがサーバーからこのエラーが返されます。
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x80070032
Config Error The configuration section 'rules' cannot be read because it is missing a section declaration
IISのバージョン10.0。
はあなたが私は(あなたがしようとしたと働いたことと同様の多分何か)
おかげで上記のようなアクセスを制限するために行うべきか知っています!
申し訳ありません、ここだけです。私は手動でstackoverflowにタグを追加しました –