Asp.net redirect in firefox not working

In my .net 3.5 web application, I redirect users to another page using response.redirect.

This works in all browsers, but not in Firefox browsers. I have no idea why?

Response.Redirect("~/"+ GlobalConsts.ARTICLE_ANALYSER_URL +"?"+ GlobalConsts.QUERYSTRING_KEY_ONE + 
            SessionHandler.RedirectToArticleID + GlobalConsts.QUERYSTRING_KEY_TWO + 
            SessionHandler.RedirectToArticleParentOrChild);
+3
source share
7 answers

Try installing this Firefox extension and writing down the headers sent to the client:

https://addons.mozilla.org/en-US/firefox/addon/3829

Headings can give you a deeper understanding of what is going wrong.

+6
source

Always check fiddler first .

, , , . expires.

, .

+3

Response.Redirect :

Response.Clear();
Response.Status = "302 Found";
Response.StatusCode = 302;
Response.AddHeader("Location", url);
Context.ApplicationInstance.CompleteRequest();

, http://www.mrclay.org/2011/07/03/firefox-5-shibboleth-issues/

, . , , :

Response.Cache.SetCacheability(HttpCacheability.NoCache); 
Response.Redirect("~/"+ GlobalConsts.ARTICLE_ANALYSER_URL +"?"+ GlobalConsts.QUERYSTRING_KEY_ONE + 
            SessionHandler.RedirectToArticleID + GlobalConsts.QUERYSTRING_KEY_TWO + 
            SessionHandler.RedirectToArticleParentOrChild);
+1

firefox about: config network.http.redirection-limit ( 1).

FireFox: Firebug.

0

javascript , ,

//javascript
function RedirectJS(url){
    window.location.href=url;
}

onclick

//C#
protected void Page_Load(object sender, EventArgs e)
{
     if(!IsPostBack)
     {
          Button1.OnClientClick = "RedirectJS('"+HttpContext.Current.Request.ApplicationPath+"/"+GlobalConsts.ARTICLE_ANALYSER_URL +"?"+ GlobalConsts.QUERYSTRING_KEY_ONE + SessionHandler.RedirectToArticleID + GlobalConsts.QUERYSTRING_KEY_TWO + SessionHandler.RedirectToArticleParentOrChild+"');";
     }
}
0

:

Response.Redirect("~/"+ GlobalConsts.ARTICLE_ANALYSER_URL +"?"+ GlobalConsts.QUERYSTRING_KEY_ONE + 
            SessionHandler.RedirectToArticleID + GlobalConsts.QUERYSTRING_KEY_TWO + 
            SessionHandler.RedirectToArticleParentOrChild,false);
0

: Response.RedirectPermanent(url, true);

-1

Source: https://habr.com/ru/post/1709482/


All Articles