Request.UrlReferrer is NULL ???

I

Ivan Demkovitch

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
 
K

Kevin Spencer

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.
 
I

Ivan Demkovitch

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?
 
K

Kevin Spencer

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 said:
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 said:
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.
 
I

Ivan Demkovitch

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 said:
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 said:
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 said:
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.

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
 
K

Kevin Spencer

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 said:
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 said:
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 said:
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?

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.

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
 
I

Ivan Demkovitch

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 said:
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 said:
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?
page
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?

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.

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
 
K

Kevin Spencer

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 said:
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 said:
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 said:
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?


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.

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?

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.

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top