[英]How do you set the IIS Application Pool Identity User Locale when it's set to ApplicationPoolIdentity
[英]For Application Pool Identity, how do you return the logged in user when authentication is both set to anonymous and windows authentication?
我是 IIS 部署的新手。 看起來應用程序池標識用戶將始終顯示為用戶的計算機名稱。 因此,如果我們使用域/用戶名作為應用程序池標識,無論誰登錄應用程序,它都會始終處理域/用戶名。
當身份驗證設置為匿名和 Windows 身份驗證時,如何返回用戶的計算機名稱?
這是我在 Startup.cs 上的內容
public void Configuration(IAppBuilder app)
{
app.UseCors(CorsOptions.AllowAll);
//app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
OAuthAuthorizationServerOptions option = new OAuthAuthorizationServerOptions
{
TokenEndpointPath = new PathString("/token"),
Provider = new ApplicationOAuthProvider(),
AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(300),
AllowInsecureHttp = true
};
app.UseOAuthAuthorizationServer(option);
app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions());
}
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthentication(IISDefaults.AuthenticationScheme);
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app)
{
app.UseAuthentication();
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.