Posts

Showing posts with the label bearer-token

static files - asp.net web api core 2.1 authentication scheme Bearer

static files - asp.net web api core 2.1 authentication scheme Bearer How can I avoid static files from being authenticated? For every request on a static file (images, .js, .css, etc) a message is logged with "AuthenticationScheme: "Bearer" was not authenticated.". Although the message is just logged when the configuration is set to debug, the resources wasted on this are just unnecessary. Everything works fine, I just want to avoid checking authentication on these requests. Is there a way to disabled this? I've tried several variations on where the authentication is set on the Configure method, but nothing worked. This is my current configuration: public void Configure(IApplicationBuilder app, IHostingEnvironment env) { var locOptions = app.ApplicationServices.GetService<IOptions<RequestLocalizationOptions>>(); app.UseRequestLocalization(locOptions.Value); if (env.IsDevelopment()) { app.UseDeveloperExc...

.Net - Share token between two webapi on same IIS

.Net - Share token between two webapi on same IIS I have a project based on Angular2 for FrontEnd and a .Net WebApi 2.0 for the backend. Now I have to implement a parallel project that has to use the same Authentication. What I want to do in my mind is create a new webapi 2.0 and share the token between the two webapi in order to avoid the user to provide the same user and password if he switch between projects. Is it possible ? The other solution is use the same Webapi for project2 and extend the controllers/methods, but I want to create a new project for it. Thanks to support 1 Answer 1 Well, if application is hosted in 2 different environment it will be treated as 2 different applications, however Load Balancer was introduced to handle multiple environments. With respect to .net : Out Proc session is the one you should be looking for, both the web application need a common layer to save token, it...