Aaron N. Tubbs bio photo

Aaron N. Tubbs

Dragon chaser.

Twitter Facebook Google+ LinkedIn Github

When will professional developers learn that they have to do things like trap what happens when a database user fails to authenticate? I understand that catching and handling every exception with proper care is difficult, but a user should never see this:

An unhandled exception was generated during the execution 
the current web request. Information regarding the origin
and location of the exception can be identified using the
exception stack trace below. 
[SqlException: Login failed for user 'xyz'.]
   System.Data.SqlClient.ConnectionPool.GetConnection...
   System.Data.SqlClient.SqlConnectionPoolManager.Get...
   System.Data.SqlClient.SqlConnection.Open() +384
   OLAPWeb.Global.IsAdminUser() in c:\clearcase\xxxx_...
   OLAPWeb.Global.Session_Start(Object sender, EventA...
   System.Web.SessionState.SessionStateModule.RaiseOn...
   System.Web.SessionState.SessionStateModule.Complet...
   System.Web.SessionState.SessionStateModule.BeginAc...
   System.Web.AsyncEventExecutionStep.System.Web.Http...
   System.Web.HttpApplication.ExecuteStep(IExecutionS...

Just because web development is “easy” dosen’t mean it can be done in a half-assed fashion; it is still development, and it still needs to be done with thought and care. I mean, how much effort is it to put a try block around the db authentication and say “there has been an authentication error, please contact your support group?”