Permission denied unless I wait and refresh webpage

Discussion in 'ASP General' started by Salty Dog, Mar 1, 2005.

  1. Salty Dog

    Salty Dog Guest

    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.
     
    Salty Dog, Mar 1, 2005
    #1
    1. Advertising

  2. Where do you set objFileStream to nothing? Where do you set objFSO to
    nothing?


    On 2/28/05 8:13 PM, in article
    , "Salty Dog"
    <> wrote:

    > 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.
     
    Aaron [SQL Server MVP], Mar 1, 2005
    #2
    1. Advertising

  3. Salty Dog

    Salty Dog Guest

    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.

    "Aaron [SQL Server MVP]" wrote:

    > Where do you set objFileStream to nothing? Where do you set objFSO to
    > nothing?
    >
    >
    > On 2/28/05 8:13 PM, in article
    > , "Salty Dog"
    > <> wrote:
    >
    > > 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.

    >
    >
     
    Salty Dog, Mar 1, 2005
    #3
  4. Salty Dog

    Salty Dog Guest

    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.

    "Aaron [SQL Server MVP]" wrote:

    > Where do you set objFileStream to nothing? Where do you set objFSO to
    > nothing?
    >
    >
    > On 2/28/05 8:13 PM, in article
    > , "Salty Dog"
    > <> wrote:
    >
    > > 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.

    >
    >
     
    Salty Dog, Mar 1, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Don
    Replies:
    3
    Views:
    901
    Teemu Keiski
    Jul 9, 2004
  2. Charlie@CBFC
    Replies:
    0
    Views:
    343
    Charlie@CBFC
    Jan 5, 2007
  3. Kyle Haish
    Replies:
    0
    Views:
    855
    Kyle Haish
    Apr 18, 2007
  4. Gábor SEBESTYÉN

    Unless unless

    Gábor SEBESTYÉN, Jun 17, 2005, in forum: Ruby
    Replies:
    3
    Views:
    158
    Gábor SEBESTYÉN
    Jun 17, 2005
  5. Replies:
    5
    Views:
    98
    Jedi Fans
    Jul 26, 2005
Loading...

Share This Page