• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
HainKurtSr. System AnalystCommented:
try

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

Server.Transfer("error.aspx")
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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