Jeg forstår heller ikke at den hænger, så vidt jeg ved burde der komme en "The page cannot be displayed" fejl.
Under alle omstændigheder hvis du ønsker at fange fejlen skal du fange den i global.asax i Application_Error - metoden.
Dette er et eksempel i VB:
If Path.GetFileName(Request.Path) = _
"UploadForm.aspx" Then
' Get the error details
Dim appException As System.Exception = _
Server.GetLastError()
Dim checkException As HttpException = _
CType(appException, HttpException)
' Verify the expected error
If checkException.GetHttpCode = 400 And _
checkException.ErrorCode = -2147467259 Then
' Error 400 = bad request, user
' tried to upload a file that's too large
Session("ImageTooLarge") = True
Server.ClearError()
' Go to the original target page
Response.Redirect("UploadForm.aspx")
End If
End If
Se evt. hele forklaringen her:
http://developer.com/db/article.php/10920_3426051_2