c# - Stop website because of startup errors -


if web service runs initialization error during startup, such not being able connect database, possible me stop website? make easier administrators see has gone wrong without checking log files , analogous terminating application if command line parameters wrong. 1 more caveat, can't use microsoft.web.administration.

you raise specific type of exception fatal errors , handle on application_error.

when catastrophic events happen , handled there generate app_offline.htm that'll bring website down without phisically stopping on iis.

this make website return 503 service unavailable semantically correct way of web service communicating it's down because of catastrophic event.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -