Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Help! SMTP Exception Error in ASP 2.0 Email Form

Reply
Thread Tools

Help! SMTP Exception Error in ASP 2.0 Email Form

 
 
Bgreer5050
Guest
Posts: n/a
 
      09-11-2007
I keep getting the following error on an asp form I have on my site. I know
the smtp settings are correct, because if I take out the user fields (i.e.
name, weight and assign a text string in code the email is processed.

Protected Sub SendEmail_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles SendEmail.Click
Const ToAddress As String = http://www.velocityreviews.com/forums/(E-Mail Removed)
Dim mm As New Net.Mail.MailMessage((E-Mail Removed), ToAddress)
mm.Subject = "Parts Request"
mm.Body = "Body" -----------------If I use mm.body = name.text I get the
timeout error
mm.Body = "weight"
mm.IsBodyHtml = False
Dim smtp As New Net.Mail.SmtpClient
smtp.Send(mm)
End Sub


Is it possible that it takes longer to process text boxes, therefore some
code needs to be added to prevent the timeout? If so, can someone help me
with the code snippet?


Here is the Error:

Service not available, closing transmission channel. The server response
was: Command timeout, closing transmission channel
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Net.Mail.SmtpException: Service not available,
closing transmission channel. The server response was: Command timeout,
closing transmission channel

Source Error:

Line 20:
Line 21: '(4) Send the MailMessage (will use the Web.config
settings)
Line 22: smtp.Send(mm)
Line 23: End Sub
Line 24:


 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      09-11-2007
On Sep 11, 10:46 pm, "Bgreer5050" <(E-Mail Removed)> wrote:
> I keep getting the following error on an asp form I have on my site. I know
> the smtp settings are correct, because if I take out the user fields (i.e.
> name, weight and assign a text string in code the email is processed.
>
> Protected Sub SendEmail_Click(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles SendEmail.Click
> Const ToAddress As String = (E-Mail Removed)
> Dim mm As New Net.Mail.MailMessage((E-Mail Removed), ToAddress)
> mm.Subject = "Parts Request"
> mm.Body = "Body" -----------------If I use mm.body = name.text I get the
> timeout error
> mm.Body = "weight"
> mm.IsBodyHtml = False
> Dim smtp As New Net.Mail.SmtpClient
> smtp.Send(mm)
> End Sub
>
> Is it possible that it takes longer to process text boxes, therefore some
> code needs to be added to prevent the timeout? If so, can someone help me
> with the code snippet?
>
> Here is the Error:
>
> Service not available, closing transmission channel. The server response
> was: Command timeout, closing transmission channel
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information
> about the error and where it originated in the code.
>
> Exception Details: System.Net.Mail.SmtpException: Service not available,
> closing transmission channel. The server response was: Command timeout,
> closing transmission channel
>
> Source Error:
>
> Line 20:
> Line 21: '(4) Send the MailMessage (will use the Web.config
> settings)
> Line 22: smtp.Send(mm)
> Line 23: End Sub
> Line 24:


Try to check the event log to see if there are any hints on that

 
Reply With Quote
 
 
 
 
Bgreer5050
Guest
Posts: n/a
 
      09-12-2007
Ok. This is a silly question....where is the event log? My site is hosted
offsite on a IIS server. Is it the same thing as the Stack Trace?

Thanks

"Alexey Smirnov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> On Sep 11, 10:46 pm, "Bgreer5050" <(E-Mail Removed)> wrote:
>> I keep getting the following error on an asp form I have on my site. I
>> know
>> the smtp settings are correct, because if I take out the user fields
>> (i.e.
>> name, weight and assign a text string in code the email is processed.
>>
>> Protected Sub SendEmail_Click(ByVal sender As Object, ByVal e As
>> System.EventArgs) Handles SendEmail.Click
>> Const ToAddress As String = (E-Mail Removed)
>> Dim mm As New Net.Mail.MailMessage((E-Mail Removed), ToAddress)
>> mm.Subject = "Parts Request"
>> mm.Body = "Body" -----------------If I use mm.body = name.text I get the
>> timeout error
>> mm.Body = "weight"
>> mm.IsBodyHtml = False
>> Dim smtp As New Net.Mail.SmtpClient
>> smtp.Send(mm)
>> End Sub
>>
>> Is it possible that it takes longer to process text boxes, therefore some
>> code needs to be added to prevent the timeout? If so, can someone help
>> me
>> with the code snippet?
>>
>> Here is the Error:
>>
>> Service not available, closing transmission channel. The server response
>> was: Command timeout, closing transmission channel
>> Description: An unhandled exception occurred during the execution of the
>> current web request. Please review the stack trace for more information
>> about the error and where it originated in the code.
>>
>> Exception Details: System.Net.Mail.SmtpException: Service not available,
>> closing transmission channel. The server response was: Command timeout,
>> closing transmission channel
>>
>> Source Error:
>>
>> Line 20:
>> Line 21: '(4) Send the MailMessage (will use the Web.config
>> settings)
>> Line 22: smtp.Send(mm)
>> Line 23: End Sub
>> Line 24:

>
> Try to check the event log to see if there are any hints on that
>



 
Reply With Quote
 
Braulio Diez
Guest
Posts: n/a
 
      09-12-2007
What do you store on name.text? It's a simple string?

I would try the following:

- Hardcode what you typed on the text box and set it as a hardcode
string, did you get an error?

- Pass what you typed on the textbox to an string variable, and assign it
to the body, did you get the error?

This tests are just to delimit where can be located the failure. It's
quite strange.

/// ------------------------------
/// Braulio Diez
///
/// http://www.tipsdotnet.com
/// ------------------------------




"Bgreer5050" wrote:

> I keep getting the following error on an asp form I have on my site. I know
> the smtp settings are correct, because if I take out the user fields (i.e.
> name, weight and assign a text string in code the email is processed.
>
> Protected Sub SendEmail_Click(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles SendEmail.Click
> Const ToAddress As String = (E-Mail Removed)
> Dim mm As New Net.Mail.MailMessage((E-Mail Removed), ToAddress)
> mm.Subject = "Parts Request"
> mm.Body = "Body" -----------------If I use mm.body = name.text I get the
> timeout error
> mm.Body = "weight"
> mm.IsBodyHtml = False
> Dim smtp As New Net.Mail.SmtpClient
> smtp.Send(mm)
> End Sub
>
>
> Is it possible that it takes longer to process text boxes, therefore some
> code needs to be added to prevent the timeout? If so, can someone help me
> with the code snippet?
>
>
> Here is the Error:
>
> Service not available, closing transmission channel. The server response
> was: Command timeout, closing transmission channel
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information
> about the error and where it originated in the code.
>
> Exception Details: System.Net.Mail.SmtpException: Service not available,
> closing transmission channel. The server response was: Command timeout,
> closing transmission channel
>
> Source Error:
>
> Line 20:
> Line 21: '(4) Send the MailMessage (will use the Web.config
> settings)
> Line 22: smtp.Send(mm)
> Line 23: End Sub
> Line 24:
>
>
>

 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      09-12-2007
On Sep 12, 2:28 am, "Bgreer5050" <(E-Mail Removed)> wrote:
> Ok. This is a silly question....where is the event log? My site is hosted
> offsite on a IIS server. Is it the same thing as the Stack Trace?
>
> Thanks
>
> "Alexey Smirnov" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) ups.com...
>
>
>
> > On Sep 11, 10:46 pm, "Bgreer5050" <(E-Mail Removed)> wrote:
> >> I keep getting the following error on an asp form I have on my site. I
> >> know
> >> the smtp settings are correct, because if I take out the user fields
> >> (i.e.
> >> name, weight and assign a text string in code the email is processed.

>
> >> Protected Sub SendEmail_Click(ByVal sender As Object, ByVal e As
> >> System.EventArgs) Handles SendEmail.Click
> >> Const ToAddress As String = (E-Mail Removed)
> >> Dim mm As New Net.Mail.MailMessage((E-Mail Removed), ToAddress)
> >> mm.Subject = "Parts Request"
> >> mm.Body = "Body" -----------------If I use mm.body = name.text I get the
> >> timeout error
> >> mm.Body = "weight"
> >> mm.IsBodyHtml = False
> >> Dim smtp As New Net.Mail.SmtpClient
> >> smtp.Send(mm)
> >> End Sub

>
> >> Is it possible that it takes longer to process text boxes, therefore some
> >> code needs to be added to prevent the timeout? If so, can someone help
> >> me
> >> with the code snippet?

>
> >> Here is the Error:

>
> >> Service not available, closing transmission channel. The server response
> >> was: Command timeout, closing transmission channel
> >> Description: An unhandled exception occurred during the execution of the
> >> current web request. Please review the stack trace for more information
> >> about the error and where it originated in the code.

>
> >> Exception Details: System.Net.Mail.SmtpException: Service not available,
> >> closing transmission channel. The server response was: Command timeout,
> >> closing transmission channel

>
> >> Source Error:

>
> >> Line 20:
> >> Line 21: '(4) Send the MailMessage (will use the Web.config
> >> settings)
> >> Line 22: smtp.Send(mm)
> >> Line 23: End Sub
> >> Line 24:

>
> > Try to check the event log to see if there are any hints on that- Hide quoted text -

>
> - Show quoted text -


Control Panel - Administrative Tools - Event Viewer

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to send email programmatically from a gmail email a/c when port587(smtp) is blocked ashish makani Python 5 09-20-2012 07:56 AM
ASP sending form via email - CDONTS / SMTP problem tamaker ASP General 3 12-13-2007 08:45 AM
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
Help! SMTP Exception Error in ASP 2.0 Email Form Bgreer5050 ASP .Net 4 09-12-2007 12:32 PM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM



Advertisments