如何设置具有标识和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)