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

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -