Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WININET Error: Error 12017 1

Status
Not open for further replies.

Jenniferlynn

Technical User
Feb 28, 2003
60
0
0
GB
Hello,
I support a Visual Basic piece of software.

We have a number of users who are having a problem with the internet update function on the software.

When performing the update, they receive a message:

"Runtime Error 9060 Caused when GET, HEAD, POST or PUT methods are used within a timeout parameter."

We are finding that everyone that receives this message is using a broadband connection.

The software uses WININET Functions when performing this update. I have discovered that if the value of the error number is greater than 12000 then the problem is most probably a WININET error.

When I check the error log that is created for the user, the following is recorded:
"Error: 12017 The operation was canceled, usually because the handle on which the request was operating was closed before the operation completed."

This is also recorded:
"Error: 12030 The connection with the server has been terminated."

I really have no idea about WININET functions. I have searched for as much information as I can, but usually you only find out info that lists the above error messages, without any hints on what the problem might be or any suggestions to fix this.

If anyone can help me at all I would be eternally grateful!

Thank you!

Jen
 
Jen,
I am just starting with the wininet function, but I wanted to let you know that this api was made for C++ programming. While it is true that Wininet can be used in VB, it is not *that* common. Perhaps if you posted this problem into a C++ forum you may get a better responce. Just a thought...

Once I learn more about this API, and if I find out what your problem is, then I will get back to you here.

LF
 
Jen,
I have found some more information that may be of some help to you.

I am not sure if this applies to your problem, but I have had a problem with this control in a program of mine. The internet standard states that no computer can have more 2 connections per server at a time. What may be happening with your program is that the users are connecting, or attempting to connect, to the same server more than 2 times. The error may come in where your program may be attempting to send information when WinInet has already closed the session due to this server limitation. There is a fix for this as I have put below...


create the following registry entry...(this entry will only be for the current user)

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings

Sets the number of simultaneous requests to a single HTTP 1.1 Server
MaxConnectionsPerServer REG_DWORD (Default 2)

MaxConnectionsPer1_0Server REG_DWORD (Default 4)
'Sets the number of simultaneous requests to a single HTTP 1.0 Server

I hope this helps you with your problem... If you are still having the problem, then perhaps you could post some of your code that handles the connection...

regards.

LF
 
Dear LF,
Thank you very much for the suggestion. I just wanted to ask a couple of questions just to check I am doing the right thing....

OK firstly I am creating a new REG_DWORD yes?

Also how do I specify the default 2 and default 4 that you suggest? Do I just add this to the Value Data field as a 2 or a 4 and if so should the base be hexidecimal or decimal?

Sorry if this sounds silly or if I am on completely the wrong lines but just wanted to check that I was doing this correctly!

Thank you for your help

Jen
 
Jen,

You are on the right track.

Yes, you are creating a new REG_DWORD.

Once you have created the REG_DWORD, then you double click on it to set it's value. I should mention that the default is 2 for the 1.1 server, which means when there is no REG_DWORD with a value present, then Internet Explorer uses 2; I would set it to F or FF which should give the necessary amount of connections. When you set the value only put the value, i.e. only put FF and not (FF). ok?

I too would want to double check with the referring person before performing such actions. You are performing brain surgery after all! ;). You will do fine.

LF
 
Dear LF,
I'm sorry that it has taken me so long to get back to you. I have actually managed to go through these instructions and I would like to give you a big kiss because it worked!!

Thank you so much for your help!

I just wanted to ask, once I have set the value to FF, am I ok to leave it like this? Would I create more problems by leaving that value set or is it perfectly safe?

Jen
 
Jenniferlynn
Read faq222-2244 para 15 to find how to give LF a 'virtual' kiss (Or star as we know them [smile]) for all his effort

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

For tsunami relief donations

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
WOW! That's better than a star Jen! Thanks!

One of the nicer things about setting this value to FF is that the user of that computer can download as many things from a single server as she/he wants to so that they do not have to wait for various downloads to complete before starting another. So the answer to your question is, the FF value should be fine. The only reason that the default value is 2 is because when creating the they had to keep in mind that millions of people will be downloading things on the internet, which, as you might imagine, would really bogg the net down if nobody had a limit on how many downloads could be present at one time, and on one server. So really what you will be doing for the people that run your software, is opening up the connection a bit; many won't even notice a difference, some may, but it really doesn't matter.

Well, I sure am glad that I could help you with this problem. Take care...

LF





"As far as the laws of mathematics refer to reality, they are not certain; as far as they are certain, they do not refer to reality."--Albert Einstein
 
Dear LF,
That's great thank you very much! You are my star!
Jen
x
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top