I am calling a Webservice with basic authentication with VBA. The problem I have is that the user/password is stored after the first successful call. That means I can put wrong user/password in the next calls and it works just the same.
Set objRequest = CreateObject("MSXML2.XMLHTTP")
blnAsync = True
With objRequest
.Open "GET", strUrl, blnAsync
.setRequestHeader "Authorization", "Basic " + EncodeBase64(user + ":" + passw)
.Send
'spin wheels whilst waiting for response
While objRequest.readyState <> 4
DoEvents
Wend
strResponse = .responseText
End With
If I call the Webservice from browser it is the same. First time I need to login, next time it works without login. After I delete cache/cookies/history I need to login again.
My questions:
- Where is this (cache?) data stored if I call from VBA and how to delete this?
- How to prevent VBA from saving the authorization data?