小编Cop*_*opo的帖子

在没有使用Identity Framework和Owin的Asp.net Web窗体上登录的情况下拒绝所有页面

如何设置具有标识和owin的Web表单应用程序以拒绝除登录之外的所有页面?

web.config中的此配置对我不起作用:

 <system.web>
    <authorization>
      <deny users="*"/>
    </authorization>
    <authentication mode="None"/> 
Run Code Online (Sandbox Code Playgroud)

错误消息:请求过滤模块配置为拒绝查询字符串太长的请求.

OWIN启动课程:

 public void ConfigureAuth(IAppBuilder app)
        {
            // Configure the db context, user manager and signin manager to use a single instance per request
            app.CreatePerOwinContext(ApplicationDbContext.Create);
            app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);
            app.CreatePerOwinContext<ApplicationSignInManager>(ApplicationSignInManager.Create);

            // Enable the application to use a cookie to store information for the signed in user
            // and to use a cookie to temporarily store information about a user logging in with a third party login provider
            // Configure the sign in cookie …
Run Code Online (Sandbox Code Playgroud)

asp.net webforms owin asp.net-identity

6
推荐指数
1
解决办法
2795
查看次数

标签 统计

asp.net ×1

asp.net-identity ×1

owin ×1

webforms ×1