Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: iHttpInit 401
Addextender("wwint34i.dll") ;...get the UserID and pw_ tophandle=iBegin(0,"","") connecthandle=iHostConnect(tophandle, "ourhost.net", @HTTP, UserID, pw_) datahandle=iHttpInit(connecthandle, "GET", "/install.exe", "",0) rslt=iHttpOpen(datahandle, "", 0, 0) ; error: returns code 401 iclose(datahandle)I'm getting the 401 HTTP response code.
If I change the iHTTPInit to look for the file "" instead, then I get the root level index.html fine. But I am unable to get any other file below it using iHTTPInit. It looks like the server is saying, "sorry you don't have access to this web page".
Does the iHTTPInit function require the userid and password to be passed in the HTTP header block somehow? If HTTP is stateless, how does it know if a client is allowed to have access to a protected page?
Message(Userid,pw_)to your script to make sure the userid/password obtaining process is not broke. Maybe even hard code it in.
Although the web server is stateless, a series of pages can have states by simply embedding information into the HTML or the users browser. Cookies are common, as well as hidden form variables.
For example if you go to http://commerce.windowware.com and do everything except actually buy something, you will notice the URL does not change, but there are obviously states involved.
Article ID: W14206
Filename: iHttpInit and 401 Error.txt
File Created: 2017:07:28:13:58:48
Last Updated: 2002:07:15:13:00:17