2

web.config ファイルでいくつかのオプションを指定することはできますか? 新しいプロジェクトを作成すると、デフォルトでこのスタートアップ クラスが取得され、古いフォーム認証セクションである web.config はなくなりました。

    // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
    public void ConfigureAuth(IAppBuilder app)
    {
        // Enable the application to use a cookie to store information for the signed in user
        app.UseCookieAuthentication(new CookieAuthenticationOptions
        {
            AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
            LoginPath = new PathString("/Account/Login")
        });
        // Use a cookie to temporarily store information about a user logging in with a third party login provider
        app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);

    }

ここにリストされている CookieAuthenticationOptions でいくつかのオプションを指定できるようにしたいと思います。

http://blogs.msdn.com/b/webdev/archive/2013/07/03/understanding-owin-forms-authentication-in-mvc-5.aspx#_Understanding_OWIN_Forms

web.config で (たとえば、有効期限のタイムアウトなど)。

4

2 に答える 2