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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows authentication for objXMLHTTP object

Status
Not open for further replies.

williey

Technical User
Jan 21, 2004
242
I found this piece of code written by Jeff Jones. It works great. But has anyone manage to get it to work with Windows Authentication?

Code:
'====================== WebDAV upload single file
Function WebUploadFile (file, url, user, pass)
  Dim objXMLHTTP
  Dim objADOStream
  Dim arrbuffer
  Set objADOStream = CreateObject("ADODB.Stream")
  objADOStream.Open
  objADOStream.Type = 1
  objADOStream.LoadFromFile file
  arrbuffer = objADOStream.Read()
  Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
  objXMLHTTP.SetOption 2, objXMLHTTP.GetOption(2)
  objXMLHTTP.open "PUT", url, False, user, pass
  objXMLHTTP.send arrbuffer
End Function

------------------------------------------
There are 10 kinds of people in this world. One that understands binary and the other one that does not.
 
What's the context? Where are you running this code?

Phil H.
Some Bank
-----------
Time's fun when you're having flies.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top