Solved

How do I abort from Global.Session_Start()?

Posted on 2011-02-11
6
269 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
  • 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 51

Assisted Solution

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

Rsponse.End()
0
 
LVL 51

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now