Request.UrlReferrer is NULL ???

Discussion in 'ASP .Net' started by Ivan Demkovitch, Jan 30, 2004.

  1. Hi!

    Here is what I'm doing:

    I have Login.aspx with code to do forms authentification and I have this
    line at the end:
    Response.Redirect(Request.UrlReferrer.ToString());

    I have other (non-ASP.NET) pages that post to Login.aspx. THis way I
    accomplish asp.net authentification.
    Response.Redirect(Request.UrlReferrer.ToString()); work nice because it
    takes user back to the place from he/she loggin in.

    However, some users reported that they get error during login.
    Error states that Reques.URLReferrer is NULL.

    How that would happen? Is that a known bug? Is there something with their
    environment?

    I didn't even think about checking for it, because this form only accessable
    when something posts to it.
    Also, I have no idea where to redirect user even I check for NULL.

    TIA
     
    Ivan Demkovitch, Jan 30, 2004
    #1
    1. Advertising

  2. If they open the page directly, without navigating to it from some other
    page, the UrlReferer will be null.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Ivan Demkovitch" <> wrote in message
    news:...
    > Hi!
    >
    > Here is what I'm doing:
    >
    > I have Login.aspx with code to do forms authentification and I have this
    > line at the end:
    > Response.Redirect(Request.UrlReferrer.ToString());
    >
    > I have other (non-ASP.NET) pages that post to Login.aspx. THis way I
    > accomplish asp.net authentification.
    > Response.Redirect(Request.UrlReferrer.ToString()); work nice because it
    > takes user back to the place from he/she loggin in.
    >
    > However, some users reported that they get error during login.
    > Error states that Reques.URLReferrer is NULL.
    >
    > How that would happen? Is that a known bug? Is there something with their
    > environment?
    >
    > I didn't even think about checking for it, because this form only

    accessable
    > when something posts to it.
    > Also, I have no idea where to redirect user even I check for NULL.
    >
    > TIA
    >
    >
     
    Kevin Spencer, Jan 30, 2004
    #2
    1. Advertising

  3. Nope.

    I understand what you saying but that is not the case here. This page is
    always posted to from somewhere.
    Form[] stuff is there, but page is not referred.

    you can see it at slka.net (forums is phpbb forums - login posted to
    login.aspx)

    I'm not sure where UrlReferer comes from on background.. If client browser
    sends it than I might know why.

    Anyone?

    "Kevin Spencer" <> wrote in message
    news:...
    > If they open the page directly, without navigating to it from some other
    > page, the UrlReferer will be null.
    >
    > --
    > HTH,
    > Kevin Spencer
    > .Net Developer
    > Microsoft MVP
    > Big things are made up
    > of lots of little things.
    >
    > "Ivan Demkovitch" <> wrote in message
    > news:...
    > > Hi!
    > >
    > > Here is what I'm doing:
    > >
    > > I have Login.aspx with code to do forms authentification and I have this
    > > line at the end:
    > > Response.Redirect(Request.UrlReferrer.ToString());
    > >
    > > I have other (non-ASP.NET) pages that post to Login.aspx. THis way I
    > > accomplish asp.net authentification.
    > > Response.Redirect(Request.UrlReferrer.ToString()); work nice because it
    > > takes user back to the place from he/she loggin in.
    > >
    > > However, some users reported that they get error during login.
    > > Error states that Reques.URLReferrer is NULL.
    > >
    > > How that would happen? Is that a known bug? Is there something with

    their
    > > environment?
    > >
    > > I didn't even think about checking for it, because this form only

    > accessable
    > > when something posts to it.
    > > Also, I have no idea where to redirect user even I check for NULL.
    > >
    > > TIA
    > >
    > >

    >
    >
     
    Ivan Demkovitch, Jan 30, 2004
    #3
  4. > Nope.
    >
    > I understand what you saying but that is not the case here. This page is


    "some users reported that they get error during login"

    How do you know that they didn't go to that page directly? Did you ask them,
    or assume?

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Ivan Demkovitch" <> wrote in message
    news:...
    > Nope.
    >
    > I understand what you saying but that is not the case here. This page is
    > always posted to from somewhere.
    > Form[] stuff is there, but page is not referred.
    >
    > you can see it at slka.net (forums is phpbb forums - login posted to
    > login.aspx)
    >
    > I'm not sure where UrlReferer comes from on background.. If client browser
    > sends it than I might know why.
    >
    > Anyone?
    >
    > "Kevin Spencer" <> wrote in message
    > news:...
    > > If they open the page directly, without navigating to it from some other
    > > page, the UrlReferer will be null.
    > >
    > > --
    > > HTH,
    > > Kevin Spencer
    > > .Net Developer
    > > Microsoft MVP
    > > Big things are made up
    > > of lots of little things.
    > >
    > > "Ivan Demkovitch" <> wrote in message
    > > news:...
    > > > Hi!
    > > >
    > > > Here is what I'm doing:
    > > >
    > > > I have Login.aspx with code to do forms authentification and I have

    this
    > > > line at the end:
    > > > Response.Redirect(Request.UrlReferrer.ToString());
    > > >
    > > > I have other (non-ASP.NET) pages that post to Login.aspx. THis way I
    > > > accomplish asp.net authentification.
    > > > Response.Redirect(Request.UrlReferrer.ToString()); work nice because

    it
    > > > takes user back to the place from he/she loggin in.
    > > >
    > > > However, some users reported that they get error during login.
    > > > Error states that Reques.URLReferrer is NULL.
    > > >
    > > > How that would happen? Is that a known bug? Is there something with

    > their
    > > > environment?
    > > >
    > > > I didn't even think about checking for it, because this form only

    > > accessable
    > > > when something posts to it.
    > > > Also, I have no idea where to redirect user even I check for NULL.
    > > >
    > > > TIA
    > > >
    > > >

    > >
    > >

    >
    >
     
    Kevin Spencer, Jan 30, 2004
    #4
  5. Kevin,

    Yes, I asked.
    I'm not sure how this object populated by ASP.NET

    One of this users using Norton Intnet Security,
    I suspect it cutting off HTTP headers...

    Another proof for me "not assuming" is this link straight to the page:
    http://www.slka.net/admin/login.aspx

    As you see you get an error that data was not posted.

    But they get error at the end of page, which means data was posted
    (therefore page was referenced)

    What do you think?


    "Kevin Spencer" <> wrote in message
    news:...
    > > Nope.
    > >
    > > I understand what you saying but that is not the case here. This page is

    >
    > "some users reported that they get error during login"
    >
    > How do you know that they didn't go to that page directly? Did you ask

    them,
    > or assume?
    >
    > --
    > HTH,
    > Kevin Spencer
    > .Net Developer
    > Microsoft MVP
    > Big things are made up
    > of lots of little things.
    >
    > "Ivan Demkovitch" <> wrote in message
    > news:...
    > > Nope.
    > >
    > > I understand what you saying but that is not the case here. This page is
    > > always posted to from somewhere.
    > > Form[] stuff is there, but page is not referred.
    > >
    > > you can see it at slka.net (forums is phpbb forums - login posted to
    > > login.aspx)
    > >
    > > I'm not sure where UrlReferer comes from on background.. If client

    browser
    > > sends it than I might know why.
    > >
    > > Anyone?
    > >
    > > "Kevin Spencer" <> wrote in message
    > > news:...
    > > > If they open the page directly, without navigating to it from some

    other
    > > > page, the UrlReferer will be null.
    > > >
    > > > --
    > > > HTH,
    > > > Kevin Spencer
    > > > .Net Developer
    > > > Microsoft MVP
    > > > Big things are made up
    > > > of lots of little things.
    > > >
    > > > "Ivan Demkovitch" <> wrote in message
    > > > news:...
    > > > > Hi!
    > > > >
    > > > > Here is what I'm doing:
    > > > >
    > > > > I have Login.aspx with code to do forms authentification and I have

    > this
    > > > > line at the end:
    > > > > Response.Redirect(Request.UrlReferrer.ToString());
    > > > >
    > > > > I have other (non-ASP.NET) pages that post to Login.aspx. THis way I
    > > > > accomplish asp.net authentification.
    > > > > Response.Redirect(Request.UrlReferrer.ToString()); work nice because

    > it
    > > > > takes user back to the place from he/she loggin in.
    > > > >
    > > > > However, some users reported that they get error during login.
    > > > > Error states that Reques.URLReferrer is NULL.
    > > > >
    > > > > How that would happen? Is that a known bug? Is there something with

    > > their
    > > > > environment?
    > > > >
    > > > > I didn't even think about checking for it, because this form only
    > > > accessable
    > > > > when something posts to it.
    > > > > Also, I have no idea where to redirect user even I check for NULL.
    > > > >
    > > > > TIA
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Ivan Demkovitch, Jan 30, 2004
    #5
  6. Hi Ivan,

    Forgive me for asking, but I didn't want to be guilty of assuming either!

    It definitely sounds like the problem is on the client somewhere. It may be
    quite difficult to track down. It would help to know what OS and
    browser/version they're using, and whether they are using (as you mentioned)
    and antivirus program, or a firewall. However, I don't believe the firewall
    would present a problem in this case; otherwise, nothing would come through.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Ivan Demkovitch" <> wrote in message
    news:...
    > Kevin,
    >
    > Yes, I asked.
    > I'm not sure how this object populated by ASP.NET
    >
    > One of this users using Norton Intnet Security,
    > I suspect it cutting off HTTP headers...
    >
    > Another proof for me "not assuming" is this link straight to the page:
    > http://www.slka.net/admin/login.aspx
    >
    > As you see you get an error that data was not posted.
    >
    > But they get error at the end of page, which means data was posted
    > (therefore page was referenced)
    >
    > What do you think?
    >
    >
    > "Kevin Spencer" <> wrote in message
    > news:...
    > > > Nope.
    > > >
    > > > I understand what you saying but that is not the case here. This page

    is
    > >
    > > "some users reported that they get error during login"
    > >
    > > How do you know that they didn't go to that page directly? Did you ask

    > them,
    > > or assume?
    > >
    > > --
    > > HTH,
    > > Kevin Spencer
    > > .Net Developer
    > > Microsoft MVP
    > > Big things are made up
    > > of lots of little things.
    > >
    > > "Ivan Demkovitch" <> wrote in message
    > > news:...
    > > > Nope.
    > > >
    > > > I understand what you saying but that is not the case here. This page

    is
    > > > always posted to from somewhere.
    > > > Form[] stuff is there, but page is not referred.
    > > >
    > > > you can see it at slka.net (forums is phpbb forums - login posted to
    > > > login.aspx)
    > > >
    > > > I'm not sure where UrlReferer comes from on background.. If client

    > browser
    > > > sends it than I might know why.
    > > >
    > > > Anyone?
    > > >
    > > > "Kevin Spencer" <> wrote in message
    > > > news:...
    > > > > If they open the page directly, without navigating to it from some

    > other
    > > > > page, the UrlReferer will be null.
    > > > >
    > > > > --
    > > > > HTH,
    > > > > Kevin Spencer
    > > > > .Net Developer
    > > > > Microsoft MVP
    > > > > Big things are made up
    > > > > of lots of little things.
    > > > >
    > > > > "Ivan Demkovitch" <> wrote in message
    > > > > news:...
    > > > > > Hi!
    > > > > >
    > > > > > Here is what I'm doing:
    > > > > >
    > > > > > I have Login.aspx with code to do forms authentification and I

    have
    > > this
    > > > > > line at the end:
    > > > > > Response.Redirect(Request.UrlReferrer.ToString());
    > > > > >
    > > > > > I have other (non-ASP.NET) pages that post to Login.aspx. THis way

    I
    > > > > > accomplish asp.net authentification.
    > > > > > Response.Redirect(Request.UrlReferrer.ToString()); work nice

    because
    > > it
    > > > > > takes user back to the place from he/she loggin in.
    > > > > >
    > > > > > However, some users reported that they get error during login.
    > > > > > Error states that Reques.URLReferrer is NULL.
    > > > > >
    > > > > > How that would happen? Is that a known bug? Is there something

    with
    > > > their
    > > > > > environment?
    > > > > >
    > > > > > I didn't even think about checking for it, because this form only
    > > > > accessable
    > > > > > when something posts to it.
    > > > > > Also, I have no idea where to redirect user even I check for NULL.
    > > > > >
    > > > > > TIA
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Kevin Spencer, Jan 30, 2004
    #6
  7. Well,

    One person had this problem uses "IE 6.0.2800.1106 on a windows ME machine"

    And I don't see anything wrong with this.

    But he also run Norton Internet security...

    May be it cut's off this part only because I post to a DIFFERENT page and
    want referrer?

    Anyway, I placed patch to redirect to home page...

    And WOW!
    Another user who had this problem confirmed that he uses NIS.

    Funny??


    "Kevin Spencer" <> wrote in message
    news:...
    > Hi Ivan,
    >
    > Forgive me for asking, but I didn't want to be guilty of assuming either!
    >
    > It definitely sounds like the problem is on the client somewhere. It may

    be
    > quite difficult to track down. It would help to know what OS and
    > browser/version they're using, and whether they are using (as you

    mentioned)
    > and antivirus program, or a firewall. However, I don't believe the

    firewall
    > would present a problem in this case; otherwise, nothing would come

    through.
    >
    > --
    > HTH,
    > Kevin Spencer
    > .Net Developer
    > Microsoft MVP
    > Big things are made up
    > of lots of little things.
    >
    > "Ivan Demkovitch" <> wrote in message
    > news:...
    > > Kevin,
    > >
    > > Yes, I asked.
    > > I'm not sure how this object populated by ASP.NET
    > >
    > > One of this users using Norton Intnet Security,
    > > I suspect it cutting off HTTP headers...
    > >
    > > Another proof for me "not assuming" is this link straight to the page:
    > > http://www.slka.net/admin/login.aspx
    > >
    > > As you see you get an error that data was not posted.
    > >
    > > But they get error at the end of page, which means data was posted
    > > (therefore page was referenced)
    > >
    > > What do you think?
    > >
    > >
    > > "Kevin Spencer" <> wrote in message
    > > news:...
    > > > > Nope.
    > > > >
    > > > > I understand what you saying but that is not the case here. This

    page
    > is
    > > >
    > > > "some users reported that they get error during login"
    > > >
    > > > How do you know that they didn't go to that page directly? Did you ask

    > > them,
    > > > or assume?
    > > >
    > > > --
    > > > HTH,
    > > > Kevin Spencer
    > > > .Net Developer
    > > > Microsoft MVP
    > > > Big things are made up
    > > > of lots of little things.
    > > >
    > > > "Ivan Demkovitch" <> wrote in message
    > > > news:...
    > > > > Nope.
    > > > >
    > > > > I understand what you saying but that is not the case here. This

    page
    > is
    > > > > always posted to from somewhere.
    > > > > Form[] stuff is there, but page is not referred.
    > > > >
    > > > > you can see it at slka.net (forums is phpbb forums - login posted to
    > > > > login.aspx)
    > > > >
    > > > > I'm not sure where UrlReferer comes from on background.. If client

    > > browser
    > > > > sends it than I might know why.
    > > > >
    > > > > Anyone?
    > > > >
    > > > > "Kevin Spencer" <> wrote in message
    > > > > news:...
    > > > > > If they open the page directly, without navigating to it from some

    > > other
    > > > > > page, the UrlReferer will be null.
    > > > > >
    > > > > > --
    > > > > > HTH,
    > > > > > Kevin Spencer
    > > > > > .Net Developer
    > > > > > Microsoft MVP
    > > > > > Big things are made up
    > > > > > of lots of little things.
    > > > > >
    > > > > > "Ivan Demkovitch" <> wrote in message
    > > > > > news:...
    > > > > > > Hi!
    > > > > > >
    > > > > > > Here is what I'm doing:
    > > > > > >
    > > > > > > I have Login.aspx with code to do forms authentification and I

    > have
    > > > this
    > > > > > > line at the end:
    > > > > > > Response.Redirect(Request.UrlReferrer.ToString());
    > > > > > >
    > > > > > > I have other (non-ASP.NET) pages that post to Login.aspx. THis

    way
    > I
    > > > > > > accomplish asp.net authentification.
    > > > > > > Response.Redirect(Request.UrlReferrer.ToString()); work nice

    > because
    > > > it
    > > > > > > takes user back to the place from he/she loggin in.
    > > > > > >
    > > > > > > However, some users reported that they get error during login.
    > > > > > > Error states that Reques.URLReferrer is NULL.
    > > > > > >
    > > > > > > How that would happen? Is that a known bug? Is there something

    > with
    > > > > their
    > > > > > > environment?
    > > > > > >
    > > > > > > I didn't even think about checking for it, because this form

    only
    > > > > > accessable
    > > > > > > when something posts to it.
    > > > > > > Also, I have no idea where to redirect user even I check for

    NULL.
    > > > > > >
    > > > > > > TIA
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Ivan Demkovitch, Jan 30, 2004
    #7
  8. Hi Ivan,

    I'm pretty sure you're on the right track. I did a Knowledge Base Search on
    ASP.Net and "antivirus" and got a listing of about 6 articles, but there was
    something wrong with the Knowledge Base and none of the pages would come up
    (I got an error page instead). So I'm going to post this link to the
    results, and you see when you can get the articles to come up. Good luck!

    http://support.microsoft.com/search...L&maxResults=25&Titles=false&numDays=&InCC=on

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Ivan Demkovitch" <> wrote in message
    news:#...
    > Well,
    >
    > One person had this problem uses "IE 6.0.2800.1106 on a windows ME

    machine"
    >
    > And I don't see anything wrong with this.
    >
    > But he also run Norton Internet security...
    >
    > May be it cut's off this part only because I post to a DIFFERENT page and
    > want referrer?
    >
    > Anyway, I placed patch to redirect to home page...
    >
    > And WOW!
    > Another user who had this problem confirmed that he uses NIS.
    >
    > Funny??
    >
    >
    > "Kevin Spencer" <> wrote in message
    > news:...
    > > Hi Ivan,
    > >
    > > Forgive me for asking, but I didn't want to be guilty of assuming

    either!
    > >
    > > It definitely sounds like the problem is on the client somewhere. It may

    > be
    > > quite difficult to track down. It would help to know what OS and
    > > browser/version they're using, and whether they are using (as you

    > mentioned)
    > > and antivirus program, or a firewall. However, I don't believe the

    > firewall
    > > would present a problem in this case; otherwise, nothing would come

    > through.
    > >
    > > --
    > > HTH,
    > > Kevin Spencer
    > > .Net Developer
    > > Microsoft MVP
    > > Big things are made up
    > > of lots of little things.
    > >
    > > "Ivan Demkovitch" <> wrote in message
    > > news:...
    > > > Kevin,
    > > >
    > > > Yes, I asked.
    > > > I'm not sure how this object populated by ASP.NET
    > > >
    > > > One of this users using Norton Intnet Security,
    > > > I suspect it cutting off HTTP headers...
    > > >
    > > > Another proof for me "not assuming" is this link straight to the page:
    > > > http://www.slka.net/admin/login.aspx
    > > >
    > > > As you see you get an error that data was not posted.
    > > >
    > > > But they get error at the end of page, which means data was posted
    > > > (therefore page was referenced)
    > > >
    > > > What do you think?
    > > >
    > > >
    > > > "Kevin Spencer" <> wrote in message
    > > > news:...
    > > > > > Nope.
    > > > > >
    > > > > > I understand what you saying but that is not the case here. This

    > page
    > > is
    > > > >
    > > > > "some users reported that they get error during login"
    > > > >
    > > > > How do you know that they didn't go to that page directly? Did you

    ask
    > > > them,
    > > > > or assume?
    > > > >
    > > > > --
    > > > > HTH,
    > > > > Kevin Spencer
    > > > > .Net Developer
    > > > > Microsoft MVP
    > > > > Big things are made up
    > > > > of lots of little things.
    > > > >
    > > > > "Ivan Demkovitch" <> wrote in message
    > > > > news:...
    > > > > > Nope.
    > > > > >
    > > > > > I understand what you saying but that is not the case here. This

    > page
    > > is
    > > > > > always posted to from somewhere.
    > > > > > Form[] stuff is there, but page is not referred.
    > > > > >
    > > > > > you can see it at slka.net (forums is phpbb forums - login posted

    to
    > > > > > login.aspx)
    > > > > >
    > > > > > I'm not sure where UrlReferer comes from on background.. If client
    > > > browser
    > > > > > sends it than I might know why.
    > > > > >
    > > > > > Anyone?
    > > > > >
    > > > > > "Kevin Spencer" <> wrote in message
    > > > > > news:...
    > > > > > > If they open the page directly, without navigating to it from

    some
    > > > other
    > > > > > > page, the UrlReferer will be null.
    > > > > > >
    > > > > > > --
    > > > > > > HTH,
    > > > > > > Kevin Spencer
    > > > > > > .Net Developer
    > > > > > > Microsoft MVP
    > > > > > > Big things are made up
    > > > > > > of lots of little things.
    > > > > > >
    > > > > > > "Ivan Demkovitch" <> wrote in message
    > > > > > > news:...
    > > > > > > > Hi!
    > > > > > > >
    > > > > > > > Here is what I'm doing:
    > > > > > > >
    > > > > > > > I have Login.aspx with code to do forms authentification and I

    > > have
    > > > > this
    > > > > > > > line at the end:
    > > > > > > > Response.Redirect(Request.UrlReferrer.ToString());
    > > > > > > >
    > > > > > > > I have other (non-ASP.NET) pages that post to Login.aspx. THis

    > way
    > > I
    > > > > > > > accomplish asp.net authentification.
    > > > > > > > Response.Redirect(Request.UrlReferrer.ToString()); work nice

    > > because
    > > > > it
    > > > > > > > takes user back to the place from he/she loggin in.
    > > > > > > >
    > > > > > > > However, some users reported that they get error during login.
    > > > > > > > Error states that Reques.URLReferrer is NULL.
    > > > > > > >
    > > > > > > > How that would happen? Is that a known bug? Is there something

    > > with
    > > > > > their
    > > > > > > > environment?
    > > > > > > >
    > > > > > > > I didn't even think about checking for it, because this form

    > only
    > > > > > > accessable
    > > > > > > > when something posts to it.
    > > > > > > > Also, I have no idea where to redirect user even I check for

    > NULL.
    > > > > > > >
    > > > > > > > TIA
    > > > > > > >
    > > > > > > >
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Kevin Spencer, Jan 30, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John

    UrlReferrer null, button click

    John, Jun 2, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    499
    Karunakararao
    Jun 2, 2004
  2. Replies:
    7
    Views:
    13,253
    justingrant
    Oct 18, 2008
  3. Logician

    UrlReferrer Null

    Logician, Sep 18, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    4,807
    Joerg Jooss
    Sep 18, 2005
  4. Replies:
    2
    Views:
    1,394
    =?Utf-8?B?c3VwZXJtYW4=?=
    Jul 8, 2006
  5. =?Utf-8?B?c3VwZXJtYW4=?=

    HttpHandler: context.Request.UrlReferrer is null

    =?Utf-8?B?c3VwZXJtYW4=?=, Jul 3, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    852
    =?Utf-8?B?c3VwZXJtYW4=?=
    Jul 3, 2006
Loading...

Share This Page