asp.net mvc3を使用して簡単なWebアプリケーションを作成しましたが、サイトへのアクセスを制御するログインページがあります。認証されていないすべてのリクエストは、このページにリダイレクトされます。
sslを使用してサイトを安全にしたい(httpsを使用)。httpsはブラウザにとって重くなるため、すべてのサイトで使用したくありません。問題は、web.configに次のタグを追加すると、VS2010 Ultimateがそれを認識せず、機能しないことです。
プロジェクトをIIS7.5にも展開しましたが、どちらも機能しません。私は何をすべきか?
<system.webServer>
<rewrite>
<rule name="Redirect to HTTP">
<match url="secureDir/(.*)" negate="true" />
<conditions>
<add input="{HTTPS}" pattern="^ON$" />
</conditions>
<action type="Redirect" url="http://{HTTP_HOST}{REQUEST_URI}" />
</rule>
<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="secureDir/(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" />
</rule>
</rewrite>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>