Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 17th, 2012, 04:29 PM
Registered User
 
Join Date: Jul 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Line 20: mySmtpClient.Send(myMessage);mySmtpClient.Send(myM essage);

I get this error when I load up email.aspx during the execution of the first email test in chapter 9. I am running this from a web server on the internet, not locally.

Web browser shows:

The operation has timed out.

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: The operation has timed out.

Source Error:


Line 18:
Line 19: SmtpClient mySmtpClient = new SmtpClient();
Line 20: mySmtpClient.Send(myMessage);
Line 21: }
Line 22: }

Source File: c:\HostingSpaces\sjurick\mydomain.com\wwwroot\Demo s\Email.aspx.cs Line: 20

------
I have double checked all syntax in all the related email.aspx, aspx.cs, and web.config and no errors showing. Would be happy to post all code if needed.

Thanks,
Steve
 
Old July 17th, 2012, 04:42 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Steve,

I think your host doesn't allow you to connect to whatever host you specified in web.config. You should ask them for the details to connect to an SMTP server.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Send Object Koeno Pro Visual Basic 2005 1 August 13th, 2008 12:50 PM
Send URL request to send sms via NowSMS deco BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 February 16th, 2008 02:45 PM
How to send SMS mistry_bhavin General .NET 0 February 5th, 2005 03:36 AM
Not able to send a mail hums .NET Framework 2.0 5 November 16th, 2004 03:56 AM
The mail can't be send jabby General .NET 2 September 8th, 2004 05:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.