Custom .NET Headers
Adding a custom header to instruct browsers on rendering directives (in this case Internet Explorer)
In Classic .NET Do this
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-UA-Compatible" value="IE=edge,chrome=1" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
.NET Core
public void Configure(IApplicationBuilder app)
{
app.Use(async (ctx, nextPipeline) =>
{
ctx.Response.OnStarting(() =>
{
ctx.Response.Headers.Add("X-UA-Compatible", "IE=edge,chrome=1");
return Task.FromResult(0);
});
await nextPipeline();
});
}