how-to-forcefully-set-ies-compatibility-mode-off-from-the-server-side

Arti Shukla 0 Reputation points
2023-12-22T16:15:39.6833333+00:00

Hi,

I have an application that opens in Edge wih IE mode due to organization policy. From that application we open Blazor application in new tab/window. Due to redirection it also opens in Edge with IE mode and Blazor does'nt wor in IE mode.

Please help how should i override policy and open Blazor in normal Edge mode

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,554 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,815 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,672 questions
{count} votes

2 answers

Sort by: Most helpful
  1. AgaveJoe 30,036 Reputation points
    2023-12-22T18:18:15.9966667+00:00

    You can try adding the following line to the head tag in the App.razor page.

    https://stackoverflow.com/questions/6771258/what-does-meta-http-equiv-x-ua-compatible-content-ie-edge-do

    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    
    

    Example

    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <base href="/" />
        <link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
        <link rel="stylesheet" href="app.css" />
        <link rel="stylesheet" href="BlazorWebAssembly.styles.css" />
        <link rel="icon" type="image/png" href="favicon.png" />
        <HeadOutlet />
    </head>
    

    I'm not sure if this will override policy. Meeting with your administrator and explaining the problem is better course of action in my opinion.


  2. ShiJieLi-MSFT 12,326 Reputation points Microsoft External Staff
    2023-12-25T09:58:06.01+00:00

    Hi @Arti Shukla ,

    You can specify your Blazor app URL to open in Edge mode by modifying the IE mode site list:

      <site url="https://yourBlazorAppURL.com">
        <compat-mode>Default</compat-mode>
        <open-in allow-redirect="true">MSEdge</open-in>
      </site>
    

    <open-in allow-redirect="true">MSEdge</open-in> specifies that if the URL is encountered in a redirect chain in Microsoft Edge, it will be opened in Microsoft Edge mode, instead of IE mode.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards,

    Shijie Li


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.