別の Web サイト内に仮想アプリケーションとして設定された管理サイトがあります。
サブ ディレクトリ (仮想アプリケーション) への訪問者に、メインの親サイトで設定されたものと同じフォーム認証を使用して資格情報の入力を求められるようにしたいと考えています。
あらゆる種類のことを試しましたが、機能させることができません。
<authentication mode="Forms">
すべての 、<authorization>
、<membership>
および<roles>
セクションを仮想アプリの web.config から削除する
<authentication mode="Forms">
同じ、<authorization>
、<membership>
および<roles>
セクションを親から仮想アプリ web.config にコピーする
仮想アプリケーションの代わりに仮想ディレクトリを使用する
しかし、資格情報の入力を求められることはありません
このセットアップを取得する方法を知っている人はいますか?
ありがとう
アップデート:
IIS でアプリケーション名を削除して (仮想アプリケーションではなく仮想ディレクトリにするため)、親からアクセス許可を継承できるようになりました。
ただし、これにより管理サイトのすべてのパスが台無しになります
たとえば、次のエラーが表示されます
ファイル '/Site.master' が存在しません。
では、仮想ディレクトリ (親から認証を継承しているように見える) を使用する必要がありますか?
または、仮想アプリケーション (現在、親から認証を継承していませんが、正しい相対パスを持っています)?
これが親構成です
<membership defaultProvider="SqlServerMembershipProvider">
<providers>
<add connectionStringName="xxxxxxxx" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" name="SqlServerMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>
<roleManager enabled="true" defaultProvider="SqlServerRoleProvider">
<providers>
<add connectionStringName="xxxxxxx" applicationName="/" name="SqlServerRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</roleManager>
<authentication mode="Forms">
<forms name=".EPiServerLogin" loginUrl="login.aspx" timeout="120"/>
</authentication>
<authorization>
<deny users="?"/>
</authorization>