473,657 Members | 2,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SmtpClient timeout wont set

Frinavale
9,735 Recognized Expert Moderator Expert
Hi there,

I am currently behind a firewall that wont let me send emails.

As a result my smtpClient.send (emailMessage) wont work on my IIS but this method does work through the VisualStudio development/test environment.

Lately I've been testing the cases where my site encounters a fault to make sure everything is handled nicely. My only concern is that the smtpClient.send () is taking way to long to time out.

I've already tried to set the timeout property but it isn't helping. It always takes up to 3 minutes to crash and this is just not acceptable by my standards (maybe I'm just impatient)

Does anyone know why the timeout property isn't setting the timeout to take less time?

Also I'm just double checking: is the timeout property value in seconds?

Thanks

-Frinny
Jan 17 '07 #1
3 6269
Frinavale
9,735 Recognized Expert Moderator Expert
Hi again,

I don't know why but upon rebooting this problem (that's been bothering me for a couple days now) suddenly went away. (?)

I'm sure now that the timeout property is in seconds....(I was thinking that it was in minutes for a while there..hehe)

-Frinny
Jan 17 '07 #2
kenobewan
4,871 Recognized Expert Specialist
You are right - timeout is in seconds. If you aren't getting the timeout that you set programmtically , then there is usually a conflicting setting - often in the web.config. Have there been changes to this file or the server/ machine?
Jan 18 '07 #3
Frinavale
9,735 Recognized Expert Moderator Expert
You are right - timeout is in seconds. If you aren't getting the timeout that you set programmtically , then there is usually a conflicting setting - often in the web.config. Have there been changes to this file or the server/ machine?

Not that I know of.

I ported the application to a new server (basically for backing up) and the time out doesn't work there at all...maybe I haven't set up the servers properly. But it did suddenly start working on my main development server....I'm not sure why because I didn't change anything.

I'll take a look into this.

Thanks

-Frinny
Jan 18 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
5483
by: bdeviled | last post by:
I am deploying to a web environment that uses load balancing and to insure that sessions persist across servers, the environment uses SQL to manage sessions. The machine.config file determines how all applications will use sessions and to insure that all application use this method, the session properties cannot be overriden. Within the sessionstate tags, the webadmin (upon my request)r emoved the property for timeout, hoping that...
1
8278
by: Nick Z. | last post by:
I am trying to connect to my SMTP server using the SmtpClient class. For some reason its refusing to work. Here is the code and the error I get. ----------------------------------------------------------- The code (I changed the server, user, and pass for obvious reasons): SmtpClient client = new SmtpClient("mail.server.com"); client.Credentials = new NetworkCredential("user", "pass");
1
3205
by: Charles Waudby | last post by:
Cannot get the SMTPClient to work with a Smart Host provided by Cable and Wireless to the NHS in England using SSL and authentication. It works using Outlook 2003 client and our code works with a W2K3 Virtual SMTP Server installed here for testing. Also the same code works with our own ISP but they do not require SSL or authentication. All we get is a time out before it downloads the SSL certificate. We have re-written the code to use...
10
3001
by: David Thole | last post by:
Hey all, I'm still very new at all this, but am going through the ASP.net 2.0 unleashed book, first chapter and trying to program my own little form emailer for fun. I tried following the code for their version in the book to the best of my abiltiies, and came across issues, mostly that a type was expected when trying to compile in MS Visual Studio 2002. When my stuff wasn't working at all, I decided to try just using his code almost...
0
2400
by: howardr101 | last post by:
Hi, Have hunted around on the groups and can't find anything, hence. I've tried this against 2 mail servers (mailtraq and hmailserver) and it occus with both. The problems seems to be that when the SMTPClient attaches to the server and the server sends it greeting message, if anything other than +OK is received by the client it throws an exception and falls over.
1
1694
by: Sammy | last post by:
I am using the following code on a company that hosts our web site. I have noticed lately that their mail server/smtp is unavailable several times a minute for a second or two. This is causing my script to fail when it calls the client.Send(msg); Will adding "client.Timeout = 1000000;" help my problem if the server can't be reached or does the timeout assume the server can be reached but waits for it to become less busy? // create...
1
1645
by: Kevien Lee | last post by:
Hi, When use the SmtpClient class,it is easy to send an e-mail,but how to konw that if the mail send successful,such as timeout and so on? can anyone advice me? Thanks
0
1529
by: adamalton | last post by:
I'm trying to investigate the way PHP behaves in relation to timeouts and included scripts. PHP seems to do very strange things when scripts that include other scripts timeout, or when the included scripts themselves timeout. Just wondering if anyone else has ever investigated this world of mystery, or if they would like to join me in my quest into the unknown!!....?? It appears that in some cases php will return a completely balnk page...
7
22865
by: Rob Dob | last post by:
The following code is giving me a timeout problem., no matter what I do I can't send a piece of mail using .net2.0 System.Net.Mail.SmtpClient via port 465 and using ssl, if however I try using outlook or outlook express it works fine.. System.Net.Mail.MailMessage msgMail = new System.Net.Mail.MailMessage("myemail@mydomain.com", "testemail@mydomain.com", "subject", "message body");
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.