• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 294
  • Last Modified:

How do I abort from Global.Session_Start()?

If the user doesnot have access to website, I want to end it right there, if possible.

How might I do this?

Can I redirect to my error page?

Thanks,
newbieweb
0
newbieweb
Asked:
newbieweb
  • 2
  • 2
  • 2
4 Solutions
 
Todd GerbertIT ConsultantCommented:
Yes, you can redirect to an error page and call Session.Abandon() there.
0
 
newbiewebSr. Software EngineerAuthor Commented:
I can not call Redirect(). IntelliSense does not see it.

Must I prefix it with something?
0
 
Todd GerbertIT ConsultantCommented:
Response.Redirect() or System.Web.HttpContext.Current.Response.Redirect().
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
HainKurtSr. System AnalystCommented:
try

Rsponse.End()
0
 
HainKurtSr. System AnalystCommented:
or use

Server.Transfer("error.aspx")
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now