Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Help! SMTP Exception Error in ASP 2.0 Email Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bgreer5050 - 11 Sep 2007 21:46 GMT
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 = abc@abc.com
Dim mm As New Net.Mail.MailMessage(abc@abc.com, 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:
Alexey Smirnov - 11 Sep 2007 22:22 GMT
> 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.
[quoted text clipped - 37 lines]
> Line 23:     End Sub
> Line 24:

Try to check the event log to see if there are any hints on that
Bgreer5050 - 12 Sep 2007 01:28 GMT
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

>> I keep getting the following error on an asp form I have on my site.  I
>> know
[quoted text clipped - 42 lines]
>
> Try to check the event log to see if there are any hints on that
Alexey Smirnov - 12 Sep 2007 13:32 GMT
> 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?
[quoted text clipped - 49 lines]
>
> - Show quoted text -

Control Panel - Administrative Tools - Event Viewer
Braulio Diez - 12 Sep 2007 12:50 GMT
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
/// ------------------------------

> 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.
[quoted text clipped - 37 lines]
> Line 23:     End Sub
> Line 24:

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.