Server.ScriptTimeout Not Working

I had a file upload page that gave an HttpException with message “Request timed out”. Natrually, I set the Server.ScriptTimeout to 360. But I still got the error rmessage. To solve this I added the following to the web.config file:

<httpRuntime
executionTimeout=360
maxRequestLength=41000 />

The maxRequestLength did not solve the problem by itself. The executionTimeout was needed as well.