R
Richard Gutery
G'day. Slight problem that has me perplexed.
We have an ASP app running on Win2K IIS 5.1, devloped on WinXPpro.
Up until the other day, the app worked without problems.
Now, the app hangs on an FSO request. I've inlcuded the relevant code below
for referrence.
Basically, the code will check to see if a dir exists (CALLOUT 1), then
checks Write permissions by trying to create
a test.txt file (CALLOUT 2), then deletes the file created in CALLOUT 3. The
uploadsDirVar points to another disk
volume and has the correct permissions (NTFS) assigned and have not changed
(see CALLOUT 3 below):
This code is thisASP file called from the site's Default.asp.
CODE SNIPPET START:
Dim fso, fileName, testFile, streamTest
(CALLOUT 1)
' TestEnvironment is a function that simply returns a string with an error
or is = to "" if no error.
TestEnvironment = ""
Set fso = Server.CreateObject("Scripting.FileSystemObject")
if not fso.FolderExists(uploadsDirVar) then
'Folder does not exist
TestEnvironment = "ERROR NO: 900 (Account Error [f] )! Contact the Office
for Assistance."
exit function
end if
' The next series try to Create and Delete a dummy file. If we cannot, then
we have a Permissions error
fileName = uploadsDirVar & "\test.txt"
on error resume next
(CALLOUT 2 - THIS IS WHERE THE APP HANGS UNTIL!)
Set testFile = fso.CreateTextFile(fileName, true)
(from here on out, everything works fine).
If Err.Number<>0 then
' No Write Permissions
TestEnvironment = "ERROR NO: 901 (Account Error [w] )! Contact the Office
for Assistance"
exit function
end if
(CALLOUT 3)
Err.Clear
' This works, so the NTFS perms are good to go!
testFile.Close fso.DeleteFile(fileName)
CODE SNIPPET END:
The dir exists and nothing has changed in terms of permissions, dir
locations or Code. No errors are returned from the Browser, Server or App.
It just hangs. Nothing in the Event Logs (Auditing turned on and shows no
errors either).
If I terminate the app (via the browser) I cannot use the app again.What I
mean to say is that when I try to connect to the app via default.asp,
everything just hangs.
If we debug the app and comment out the lines at CALLOUT 2 (between the If
and Endif) all works fine.if I create test.txt in Explorer, comment out
CALLOUT 2 and execute the app, CALLOUT 3 will delete the file, so we know
that IUSR_machine has the correct permissions which suggest that the server,
app and code are all good.
Any Ideas???
Richard
We have an ASP app running on Win2K IIS 5.1, devloped on WinXPpro.
Up until the other day, the app worked without problems.
Now, the app hangs on an FSO request. I've inlcuded the relevant code below
for referrence.
Basically, the code will check to see if a dir exists (CALLOUT 1), then
checks Write permissions by trying to create
a test.txt file (CALLOUT 2), then deletes the file created in CALLOUT 3. The
uploadsDirVar points to another disk
volume and has the correct permissions (NTFS) assigned and have not changed
(see CALLOUT 3 below):
This code is thisASP file called from the site's Default.asp.
CODE SNIPPET START:
Dim fso, fileName, testFile, streamTest
(CALLOUT 1)
' TestEnvironment is a function that simply returns a string with an error
or is = to "" if no error.
TestEnvironment = ""
Set fso = Server.CreateObject("Scripting.FileSystemObject")
if not fso.FolderExists(uploadsDirVar) then
'Folder does not exist
TestEnvironment = "ERROR NO: 900 (Account Error [f] )! Contact the Office
for Assistance."
exit function
end if
' The next series try to Create and Delete a dummy file. If we cannot, then
we have a Permissions error
fileName = uploadsDirVar & "\test.txt"
on error resume next
(CALLOUT 2 - THIS IS WHERE THE APP HANGS UNTIL!)
Set testFile = fso.CreateTextFile(fileName, true)
(from here on out, everything works fine).
If Err.Number<>0 then
' No Write Permissions
TestEnvironment = "ERROR NO: 901 (Account Error [w] )! Contact the Office
for Assistance"
exit function
end if
(CALLOUT 3)
Err.Clear
' This works, so the NTFS perms are good to go!
testFile.Close fso.DeleteFile(fileName)
CODE SNIPPET END:
The dir exists and nothing has changed in terms of permissions, dir
locations or Code. No errors are returned from the Browser, Server or App.
It just hangs. Nothing in the Event Logs (Auditing turned on and shows no
errors either).
If I terminate the app (via the browser) I cannot use the app again.What I
mean to say is that when I try to connect to the app via default.asp,
everything just hangs.
If we debug the app and comment out the lines at CALLOUT 2 (between the If
and Endif) all works fine.if I create test.txt in Explorer, comment out
CALLOUT 2 and execute the app, CALLOUT 3 will delete the file, so we know
that IUSR_machine has the correct permissions which suggest that the server,
app and code are all good.
Any Ideas???
Richard