Permission denied unless I wait and refresh webpage

S

Salty Dog

Code:
PrinterShare = "\\Garchive\ISLaser"

Set objFileStream = objFSO.CreateTextFile(PrinterShare)
objFileStream.Write("test")
objFileStream.close()

This code is on a page that if redirected to or javascript window.opened
then I'll get a "Permission denied" error message.
If I wait maybe 3-5 minutes, I can refresh the page and the print job will
print successfully.
 
A

Aaron [SQL Server MVP]

Where do you set objFileStream to nothing? Where do you set objFSO to
nothing?
 
S

Salty Dog

I've been setting objFSO = nothing and now I'm setting objFileStream and
objFile = nothing right after they are closed. Still requires a wait before
the code will succeed.
 
S

Salty Dog

I feel that this has something to do with the fact that this page is opened
with a javascript window.open and also occurs if I response.redirect to this
page. If I open this up directly, it appears to work fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top