Solved

How do I abort from Global.Session_Start()?

Posted on 2011-02-11
6
280 Views
Last Modified: 2012-05-11
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
Comment
Question by:newbieweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 33

Accepted Solution

by:
Todd Gerbert earned 250 total points
ID: 34875249
Yes, you can redirect to an error page and call Session.Abandon() there.
0
 

Author Comment

by:newbieweb
ID: 34875286
I can not call Redirect(). IntelliSense does not see it.

Must I prefix it with something?
0
 
LVL 33

Assisted Solution

by:Todd Gerbert
Todd Gerbert earned 250 total points
ID: 34875337
Response.Redirect() or System.Web.HttpContext.Current.Response.Redirect().
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
LVL 56

Assisted Solution

by:HainKurt
HainKurt earned 250 total points
ID: 34875346
try

Rsponse.End()
0
 
LVL 56

Assisted Solution

by:HainKurt
HainKurt earned 250 total points
ID: 34875349
or use

Server.Transfer("error.aspx")
0
 

Author Closing Comment

by:newbieweb
ID: 34916372
Thanks.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question