Typically, two ways to handle this:
1) your error handler would decide that the user shouldn't get access, so it
would respond with an HTML stream... effectively a web page produced by
code, that explains that an error occurred. It is good form to provide a
link to a useful home page.
2) create two virtual directories in your app: one public with an error page
(and a login page, and any other pages that are available to the general
public) and the other as an application. If the app doesn't start up,
redirect the user to the error page in the other vdir.
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Robb Gilmore" <Ro*********@discussions.microsoft.com> wrote in message
news:4D**********************************@microsof t.com...
Hi,
We have an ASP.NET web application that attempts to check some database
conditions in Application_start to ensure that all is well before the app
comes up. However, I figure out how to force the app to exit if this
verification fails. Just throwing an exception doesn't seem to do the
trick.
The app still comes up.
I feel like I should be able to call Application.exit() inside of
Application_start, but of course there is no such thing here.
What is the best way to accomplish this?
thanks
Robb