WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

WinInet
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Error 12007: The server name could not be resolved.

Keywords: 	 Error 12007: The server name could not be resolved ERROR_INTERNET_NAME_NOT_RESOLVED

Question:

When I run the following code:
URL = "http://www.windowware.com"
saveas= "c:\temp\abc.txt"

; Normal Direct Connect
AddExtender("WWINT34i.DLL")

tophandle=iBegin(0,"","")
datahandle=iUrlOpen(tophandle,URL)

if datahandle==0
   err=iGetLastError()
   Message("Last Error",err)
   iClose(tophandle)
   exit
endif

xx=iReadData(datahandle, saveas)
iClose(datahandle)
iClose(tophandle)
Message("All","Done")
exit 
I get Error: 12007: ERROR_INTERNET_NAME_NOT_RESOLVED The server name could not be resolved.

I can connect with IE however.....

Answer:

Maybe check your connection. Can you access that same url via your web browser?

Is a firewall/proxy involved? you are probably behind a firewall, usually the proxy server will resolve your host name for you, but you need to tell wininet that you are using a proxy connection, so it wont try to resolve the hostname and you wont get

ERROR_INTERNET_NAME_NOT_RESOLVED.

You will need to modify the iBegin statement.

Try changing the iBegin statment to:

tophandle=iBegin(2,"<registry>","<registry>")

Article ID:   W15093
File Created: 2017:07:28:12:58:44
Last Updated: 2006:10:19:11:43:46