c# - on_click event and timeout server -


the context : working on website/wep app in company containing page used send 280 e-mails users.

all working fine in test server on production server got timeout in middle of function (it take 5 min send everything) users received mail, others no.

in test server, working , 1 received mails, no error, no exception, no timeout.

by looking @ of our site has same functionality using same code, i saw @ beginning of pageload : server.scripttimeout = 600

the question :

my function sending mail looks :

onclick() {     foreach()     {         sendmail()     } } 

as foreach takes 5 min iterate entirely, possible on_click event button trigs timeout ?

thanks helping

note : it's custom button whith confirmmessage block page until event clic over.

note 2 : don't see problem in code since important sending part copied on 1 of our working application, tried code while commenting message.send() function , there no problem @ all. problem our mail address in database can't test them unless send real mail, , don't want send real mails tests :)

yes, onclick event can timeout.

the default timeout iis 110 seconds (refer msdn doc). can change max executiontimeout in web.config using <httpruntime executiontimeout = "hh:mm:ss" />

when you're debugging, executiontimeout property not applied. why didn't see problem while developping function.

if call function using ajax (through scriptmanager), can set different time maximum execution time asyncpostbactimeout property.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -