Lantrax
asked on
FSO impersonation, ADODB.Stream or anything that will work
I am trying to grab an image using FSO and it is accross the network on another server. This is what i have thus far:
__________________________ __________ __________ __________ __________ __________ __________ ____
Dim objFSO, objFile
Const FILE_GRABBING = "\\TheServer\client_data\C lientFolde r\pics\156 0639_1.JPG "
set objFSO = Server.CreateObject("Scrip ting.FileS ystemObjec t")
If (objFSO.FileExists(FILE_GR ABBING)) Then
Set objFile = objFSO.GetFile(FILE_GRABBI NG)
Response.Write("2-Got It<br>")
Response.Write("FILE_GRABB ING = " & FILE_GRABBING & "<br>")
Else
Response.Write("2-Notta<br >")
Response.Write("FILE_GRABB ING = " & FILE_GRABBING & "<br>")
End If
set objFSO = nothing
__________________________ __________ __________ __________ __________ __________ __________ ___
I know the image is there and i am it is not grabbing it. I need to use impersonation to get to the server i am grabbing the images from but i did not think that i needed to do that when using FSO.
How can i accomplish this using FSO and impersonation.
__________________________ __________ __________ __________ _______
I also tried ADODB.Stream but i keep getting this error:
ADODB.Stream error '800a0bba'
File could not be opened.
__________________________ __________ __________ __________ _______
I just need to get anything to work without using a 3rd party componant.
Any ideas from anyone.
__________________________
Dim objFSO, objFile
Const FILE_GRABBING = "\\TheServer\client_data\C
set objFSO = Server.CreateObject("Scrip
If (objFSO.FileExists(FILE_GR
Set objFile = objFSO.GetFile(FILE_GRABBI
Response.Write("2-Got It<br>")
Response.Write("FILE_GRABB
Else
Response.Write("2-Notta<br
Response.Write("FILE_GRABB
End If
set objFSO = nothing
__________________________
I know the image is there and i am it is not grabbing it. I need to use impersonation to get to the server i am grabbing the images from but i did not think that i needed to do that when using FSO.
How can i accomplish this using FSO and impersonation.
__________________________
I also tried ADODB.Stream but i keep getting this error:
ADODB.Stream error '800a0bba'
File could not be opened.
__________________________
I just need to get anything to work without using a 3rd party componant.
Any ideas from anyone.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
hmm. sorry. I do not.
use xml:
Set objHTTP = Server.CreateObject("MSXML 2.XMLHTTP" )
objHTTP.Open "GET", WebUrl, False
objHTTP.Send
set objHTTP = nothing
Set objHTTP = Server.CreateObject("MSXML
objHTTP.Open "GET", WebUrl, False
objHTTP.Send
set objHTTP = nothing
ASKER
My problem is that i can't seem to get FSO to use impersonation nor can i get ADODB to use impersonation.
Do you know how to do either of these?