0

I have an asp.net mvc web application hosted in IIS and one of the pages sends e-mails to several inhouse employees. Sometimes this list can grow up to a hundred employees and each e-mail takes about 5 seconds.

I was expecting the page to timeout but it doesn't and I don't know why... It just keeps on running for 10 minutes if neccesary and finishes successfully.

I have seen this post: IIS Request Timeout on long ASP.NET operation

But there is nothing special in the web.config related to timeouts. I suspect this is a server setting somewhere.

Any guesses what this could be ?

Thanks !

Community
  • 1
  • 1
user1841243
  • 1,663
  • 2
  • 19
  • 35

1 Answers1

0

I do not know your SMTP config or if you use the SmtpClient to send the mails. But I think this operation takes to long. I would recommend you to use a pickup directory and an SMTP relay to send the mails. This will speed up the performacance and removes this constraint from you application. This is an example of a pickup directory config:

<?xml version="1.0" encoding="utf-8"?>
<smtp deliveryMethod="SpecifiedPickupDirectory" deliveryFormat="SevenBit" from="example@example.com">
  <network host="localhost" port="25" defaultCredentials="true" enableSsl="false" />
  <specifiedPickupDirectory pickupDirectoryLocation="C:\MailPickup" />
</smtp>
CodeTherapist
  • 2,776
  • 14
  • 24