B
BTHOMASinOHIO
I am confussed on what the heck is going on ?! I have an HTML INPUT
File Box on an Email Piece of an application. I know that File Size is
set to 4MB in the WebConfig File and that is fine, but I have a couple
problems that include the magical 4mb number.
1. My problem is that when my file is over the 4 mb limit. If the 4 MB
limit is met then the code on the button I use doesn't even fire (as I
have code to check the file length before it is attached to the email
maessage). How or what can be done to capture the error/file size?
I do have code in my button to capture it, but it never runs,
"...
Dim AttachmentLength As Integer = MyFile.PostedFile.ContentLength
If AttachmentLength < 4000000 Then
Response.Write("NOT too big")
else
Response.Write("TOO big")
End If
...."
2. If my File is between 1.6/1.7MB and 4MB, it is okay until the part
where the email is built and sent. It errors out at:
"Catch ehttp As System.Web.HttpException"
and replies "***ERRORS OUT HERE !! ***".
Why between the 1.6mb and 4mb mark does it bomb out at the emailing
piece ?!
"...
Try
Msg.From = "(e-mail address removed)"
Msg.To = "(e-mail address removed)"
Msg.Subject = SubjectTextBox.Text
Msg.Body = MessageTextBox.Text
Msg.BodyFormat = MailFormat.Text
Try
SmtpMail.SmtpServer = .....
SmtpMail.Send(Msg)
Page.RegisterClientScriptBlock("FillerWord",
"<script language='javascript'>alert(successful')</script>")
Catch ehttp As System.Web.HttpException
Page.RegisterClientScriptBlock("FillerWord",
"<script language='javascript'>alert('***ERRORS OUT HERE !!
***')
</script>")
End Try
Catch ee As IndexOutOfRangeException
Page.RegisterClientScriptBlock("FillerWord",
"<script language='javascript'>alert('UNKNOWN ERROR ***')
</script>")
End Try
...."
PLEASE HELP !!
bthomas71chevy_AT_excite_DOT_com
File Box on an Email Piece of an application. I know that File Size is
set to 4MB in the WebConfig File and that is fine, but I have a couple
problems that include the magical 4mb number.
1. My problem is that when my file is over the 4 mb limit. If the 4 MB
limit is met then the code on the button I use doesn't even fire (as I
have code to check the file length before it is attached to the email
maessage). How or what can be done to capture the error/file size?
I do have code in my button to capture it, but it never runs,
"...
Dim AttachmentLength As Integer = MyFile.PostedFile.ContentLength
If AttachmentLength < 4000000 Then
Response.Write("NOT too big")
else
Response.Write("TOO big")
End If
...."
2. If my File is between 1.6/1.7MB and 4MB, it is okay until the part
where the email is built and sent. It errors out at:
"Catch ehttp As System.Web.HttpException"
and replies "***ERRORS OUT HERE !! ***".
Why between the 1.6mb and 4mb mark does it bomb out at the emailing
piece ?!
"...
Try
Msg.From = "(e-mail address removed)"
Msg.To = "(e-mail address removed)"
Msg.Subject = SubjectTextBox.Text
Msg.Body = MessageTextBox.Text
Msg.BodyFormat = MailFormat.Text
Try
SmtpMail.SmtpServer = .....
SmtpMail.Send(Msg)
Page.RegisterClientScriptBlock("FillerWord",
"<script language='javascript'>alert(successful')</script>")
Catch ehttp As System.Web.HttpException
Page.RegisterClientScriptBlock("FillerWord",
"<script language='javascript'>alert('***ERRORS OUT HERE !!
***')
</script>")
End Try
Catch ee As IndexOutOfRangeException
Page.RegisterClientScriptBlock("FillerWord",
"<script language='javascript'>alert('UNKNOWN ERROR ***')
</script>")
End Try
...."
PLEASE HELP !!
bthomas71chevy_AT_excite_DOT_com