skip to Main Content

HTTP Error 400. The request hostname is invalid. On IIS when using `AllowedHosts` appsettings property – Asp.net

I get the error HTTP Error 400. The request hostname is invalid. on swagger when configuring CORS using the AllowedHost property. var origins = Configuration["AllowedHosts"].Split(";"); services.AddCors(options => { options.AddDefaultPolicy(builder => { builder.WithOrigins(origins) .AllowAnyHeader() .AllowAnyMethod(); }); }); But if I use…

VIEW QUESTION

.NET API threading issue (DBContext) – Asp.net

I am implementing an API and as part of it I have setup a custom .Net Middleware service extension UseRequestLoggingModdlewareExtension() that it run between the following: app.UseHttpsRedirection(); app.UseRequestLoggingModdlewareExtension(); app.UseRouting(); The code is simple, and just logs the output of the…

VIEW QUESTION
Back To Top
Search