Forms Authentication -- A doubt ?

  • Thread starter Thread starter vivekian
  • Start date Start date
V

vivekian

Hi ,

When using forms authentication in .Net , was wondering how can it be
made sure that when a page load to a page say default.aspx is made ,
that it has been redirected from a page say login.aspx and not a direct
hit to the page.

Thanks,
vivekian
 
vivekian said:
Hi ,

When using forms authentication in .Net , was wondering how can it be
made sure that when a page load to a page say default.aspx is made ,
that it has been redirected from a page say login.aspx and not a direct
hit to the page.

Thanks,
vivekian

Hi,
Just check your Request.UrlReferrer.ToString() That will tell you the
page that referred the user. If it is empty, it was probably a
bookmark or the user directly typed in the URL.

Ken - KC7RAD
www.aninetworks.com
 
If its a prerequisiste that they have been through login.aspx then you
should hold a session value that indicates they have or not - are
authenticated or not. On session end invalidate that value.

Regards

John Timney (MVP)
 

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

Back
Top