views:

125

answers:

2

When I try to run a really long action (takes around 2 minutes locally) on my live server, I get this error:

Connection Interrupted

The connection to the server was reset while the page was loading.

The network link was interrupted while negotiating a connection. Please try again.

I changed the timeout to be 1 hour:

<httpRuntime executionTimeout="3600" />

... but it didn't fix it. What could be causing this and how could I fix it?

Thanks

+2  A: 

Check the timeout in IIS.

Also, are there any proxies between you and the server?

SLaks
There are no proxies, but this might have something to do with IIS. I'll ask the server admin to check it out (I can only change stuff related to my app right now).
marcgg
A: 

Most likely this is the browser, not the server. IE, for example, will timeout if it hasn't received any data from the server in 2 minutes by default.

Bottom line: you're better off figuring out why you're doing something that's very long-running and not doing it.

Edit

Note: the link talks mainly about the KeepAliveTimeout, but the ServerInfoTimeout is the one causing you trouble. You can fix things on your box by following the instructions in the link. This will not fix the consumers of your website, however, so you're better off not doing things that take a long time.

Randolpho
No; that would give `Connection timed out`.
SLaks
Hmm.... excellent point, @SLaks. Well, I'll keep my answer up, just in case. Could be a reverse proxy setting.
Randolpho
It's taking long because it's a complex import script. I guess I could make it an .exe and run it on the server
marcgg