billy
2008-03-31 13:56:10 UTC
i'm good at administrative .vbs and .hta, but very weak on .asp. i
hope you can help.
so i have a web server configured to use "intigrated windows
authentication" (anonymous disabled) and asp code that should check
for a file, link to it, and list the modified date. here is a snippet:
strPCBPath = "./Users/" & Replace(LOGON_USER, "DOMAIN\", "")
If objFSO.FileExists(strPCBPath & ".html") Then _
strHTML = strHTML & vbcrlf & "<tr><td><a href=""" &
strPCBPath _
& ".html"">View Inventory</a></td>" & vbcrlf & "<td>" _
& objFSO.GetFile(strPCBPath & ".html").DateLastModified & "</
td></tr>"
my problem is that with this code as listed, the "If" statement always
answers false. If i remove the "If" statement alone, i get "Microsoft
VBScript runtime error '800a0035' File Not Found", but if i then also
remove the the "DateLastModified" statement, clicking on the link
loads the desired page.
strPCBPath = "./Users/" & Replace(LOGON_USER, "DOMAIN\", "")
strHTML = strHTML & vbcrlf & "<tr><td><a href=""" &
strPCBPath _
& ".html"">View Inventory</a></td>" & vbcrlf & "<td></td></
tr>"
it seems to me like the script is running under a different context
than the authenticated user and cannot verify the existance of the
file or get the date. the linked files do not have standard access
rights on them, so i wonder if that is part of the problem (the
authenticated user does have "modify"). but changing the security so
that "everyone" has read access doesn't help. i need to verify the
file existance and get the DateLastModified info. your help would be
appriciated.
hope you can help.
so i have a web server configured to use "intigrated windows
authentication" (anonymous disabled) and asp code that should check
for a file, link to it, and list the modified date. here is a snippet:
strPCBPath = "./Users/" & Replace(LOGON_USER, "DOMAIN\", "")
If objFSO.FileExists(strPCBPath & ".html") Then _
strHTML = strHTML & vbcrlf & "<tr><td><a href=""" &
strPCBPath _
& ".html"">View Inventory</a></td>" & vbcrlf & "<td>" _
& objFSO.GetFile(strPCBPath & ".html").DateLastModified & "</
td></tr>"
my problem is that with this code as listed, the "If" statement always
answers false. If i remove the "If" statement alone, i get "Microsoft
VBScript runtime error '800a0035' File Not Found", but if i then also
remove the the "DateLastModified" statement, clicking on the link
loads the desired page.
strPCBPath = "./Users/" & Replace(LOGON_USER, "DOMAIN\", "")
strHTML = strHTML & vbcrlf & "<tr><td><a href=""" &
strPCBPath _
& ".html"">View Inventory</a></td>" & vbcrlf & "<td></td></
tr>"
it seems to me like the script is running under a different context
than the authenticated user and cannot verify the existance of the
file or get the date. the linked files do not have standard access
rights on them, so i wonder if that is part of the problem (the
authenticated user does have "modify"). but changing the security so
that "everyone" has read access doesn't help. i need to verify the
file existance and get the DateLastModified info. your help would be
appriciated.