Discussion:
winint timeout
(too old to reply)
Oded
2008-05-29 12:36:00 UTC
Permalink
Hi,
I'm using wininet API to perform uploading of big files to a server (IIS),
including going through authentication. Everything works just fine, except
that i keep getting timeout (at least this is what i think) after abuout 3
minutes.
The setting in the IIS are ok - using web config:
<httpRuntime maxRequestLength="208400" executionTimeout="1500"/>
i also checked when i drop this number to for example 15 seconds the
connection is stoped after around 30 seconds (because of the authentication
phase, i see 2 calls coming out from the client, the first fails
authentication and the seconds succeeds).
i tried setting the timeout using all possible flags i could find:
DWORD dwLength = sizeof(DWORD);
DWORD dwTimeut = 1500000; // 1500 seconds
InternetSetOption(hSession, INTERNET_OPTION_SEND_TIMEOUT, &dwTimeut,
sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_DATA_SEND_TIMEOUT, &dwTimeut,
sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_RECEIVE_TIMEOUT, &dwTimeut,
sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_DATA_RECEIVE_TIMEOUT, &dwTimeut,
sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT,
&dwTimeut, sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_CONTROL_SEND_TIMEOUT, &dwTimeut,
sizeof(DWORD));

but i keep getting this timeout everytime without any change (it also
doesn't work when i set it to a smaller number e.g. 5 seconds).
i saw a few references about this feature not working properly, but i also
saw some people referring to it as working.
I have IE7 installed on my XP machine.
i would be very appriative if anyone can "shed some light" on this issue.
10x.
Volodymyr M. Shcherbyna
2008-06-03 13:40:53 UTC
Permalink
Hello,

What is the size of files? IIRC, internally wininet uses DWORD value to hold
the file size, os its limited only to 4 gb.
--
V.
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by Oded
Hi,
I'm using wininet API to perform uploading of big files to a server (IIS),
including going through authentication. Everything works just fine, except
that i keep getting timeout (at least this is what i think) after abuout 3
minutes.
<httpRuntime maxRequestLength="208400" executionTimeout="1500"/>
i also checked when i drop this number to for example 15 seconds the
connection is stoped after around 30 seconds (because of the
authentication
phase, i see 2 calls coming out from the client, the first fails
authentication and the seconds succeeds).
DWORD dwLength = sizeof(DWORD);
DWORD dwTimeut = 1500000; // 1500 seconds
InternetSetOption(hSession, INTERNET_OPTION_SEND_TIMEOUT, &dwTimeut,
sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_DATA_SEND_TIMEOUT, &dwTimeut,
sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_RECEIVE_TIMEOUT, &dwTimeut,
sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_DATA_RECEIVE_TIMEOUT, &dwTimeut,
sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT,
&dwTimeut, sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_CONTROL_SEND_TIMEOUT, &dwTimeut,
sizeof(DWORD));
but i keep getting this timeout everytime without any change (it also
doesn't work when i set it to a smaller number e.g. 5 seconds).
i saw a few references about this feature not working properly, but i also
saw some people referring to it as working.
I have IE7 installed on my XP machine.
i would be very appriative if anyone can "shed some light" on this issue.
10x.
Oded
2008-06-12 10:13:00 UTC
Permalink
Hi,
Files are not reaching such sizes. Only a few 10s or 100s MB.
Anyway, i managed to solve it afterall. apperently beside the configuration
per application (in the web.config file), i had to change the default IIS
value on the whole website to higher value (default is 900 seconds...). Just
went to Properties->Website->Conenction timeout and updated the value.

What is strange is that i was under the impression that the web.config
values should have overwritten this value (since now all the applications
under this website have to have this long timeout).
10x.

Loading...