• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 291
  • 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
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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