When using PostURL() of the Inet object (passing in, url, http headers, port number and internet result object)

for certain long running

transactions that take over 30 seconds, sometimes PostURL() would return a -6.




Windows 7

Reproducing the Issue

Problem sometimes happens with long running transactions that can take over 30 seconds.



By setting the Wininet logging in the Event Viewer per

it showed an event 'WININET_REQUEST_HEADER' posted at 11:30:03AM. The next event happened 30

seconds later with the WININET_HANDLE_CLOSED at 11:30:33AM.

PostURL will call api functions from the wininet.dll. PostURL will return -6 if the wininet's httpsendrequest() fails.

From the PowerBuilder online help on PostURL():

The PostURL function relies on wininet.dll to post a request and returns -1 when the posting time exceeds the

DLL timeout value. When you install Internet Explorer 7 or later, the default timeout value for this DLL is 30

seconds. Although it is possible to change the timeout value by configuring a ReceiveTimeOut registry key

under HKEY_CURRENT_USER\ SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings, this is not

recommended, since it can also affect the behavior of the Internet Explorer browser.




The following resolution involves editing the registry. Using the Registry Editor incorrectly can cause serious problems.

Use the Registry Editor at your own risk. Refer to KBA 1323322 for more information.

The ReceiveTimout registry entry was added to HKEY_CURRENT_USER\

SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings in

the format listed in


It was set to 90 seconds up from the 30 second default.