I'm new to IIS Deployment. It looks like the application pool identity user will always show as computer name of the user. So if we use domain/username as app pool identity, it will always treat domain/username regardless who is logged in on the app.
How do you return the computer name of the user when authentication is both set to anonymous and windows authentication?
Here's what I have on 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();
}