Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

366
Visualizações
C# Redirect to about:blank

While using RedirectResult Redirect(string url) with "about:blank" it returns error that side cannot be reached and it loops infinitely inside my controller method

Can you please advice how could I handle about:blank case?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The redirect is basically done by using two declares on Headers - the url and the status.

So the very basic of redirect is this two lines of code (for the "about:blank") where for security reasons is forbitten and response with ERR_UNSAFE_REDIRECT

Response.StatusCode = 301;
Response.RedirectLocation = "about:blank";

So this can not be done using redirect and header declarations.

There is a way around - use JavaScript and run this line

<script>window.location.href = 'about:blank';</script>

Alternative consider to create an empty page and redirect to this empty existing page - and avoid the about:blank

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda