Timeout directive in ASp.NET
Posted on 2008-06-19
i have a website developed by ASP.NET 2.0 , I have one page called sendbulkemail.aspx , simply i send email to a about 3000 custemr that exists in a table in our databse , any way , The problem is i got error meassege after may be 2 minute as follwoing
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.
Line 43: Dim smtp As New SmtpClient
Line 44: '(4) Send the MailMessage (will use the Web.config settings)
Line 45: smtp.Send(Mail)
Line 46: '*************************
Line 47: '(1) Create the MailMessage instance
I think this because the operation take long time so the error comes up
i heared about thers a directive called timeout , but i is this will solve my problem ? if yes how to use this directive