write a file to as subfolder of a InetServer location

Discussion in 'ASP General' started by Thanh-Nhan Le, Oct 15, 2007.

  1. Hello,

    I have an ASP application on IIS server:
    http://localhost/myApp
    I use ASP and a my own VB activex DLL to create a pdf file and write this
    file to a subfolder of the Application folder:
    http://localhost/myApp/pdfs

    1-
    Over IIS I have set the "write permission" for this subfolder.
    But each time I receive the message: "Can't open output file (bad filename,
    in use by other application)", error 0x80040202

    2- a visual basic test application can call this DLL, generate and write the
    file without problem to the folder

    3- with ASP I generate the file in a normal folder (ie c:\temp), it works
    Then my ASP page use FileSystemObject to copy this file to the folder
    ...MyApp/pdfs
    When I call this page there is no error message, but the programm runs utils
    the line, where FileSystemObject to copy the file to the folder, then it
    stops there. The process is hung (dead). The file is not copied...

    How can I do?

    Thanks
    Nhan
     
    Thanh-Nhan Le, Oct 15, 2007
    #1
    1. Advertising

  2. "Thanh-Nhan Le" <> wrote in message
    news:...
    > Hello,
    >
    > I have an ASP application on IIS server:
    > http://localhost/myApp
    > I use ASP and a my own VB activex DLL to create a pdf file and write this
    > file to a subfolder of the Application folder:
    > http://localhost/myApp/pdfs
    >
    > 1-
    > Over IIS I have set the "write permission" for this subfolder.
    > But each time I receive the message: "Can't open output file (bad

    filename,
    > in use by other application)", error 0x80040202



    The above step affects http access rights and is irrelevant to what you are
    doing. The dll is accessing the folder via the windows file system.

    You need to grant the IUSR_<machinename> user account Read Write access to
    folder you've created using windows explorer.

    >
    > 2- a visual basic test application can call this DLL, generate and write

    the
    > file without problem to the folder
    >
    > 3- with ASP I generate the file in a normal folder (ie c:\temp), it works
    > Then my ASP page use FileSystemObject to copy this file to the folder
    > ..MyApp/pdfs
    > When I call this page there is no error message, but the programm runs

    utils
    > the line, where FileSystemObject to copy the file to the folder, then it
    > stops there. The process is hung (dead). The file is not copied...
    >
    > How can I do?


    --
    Anthony Jones - MVP ASP/ASP.NET
     
    Anthony Jones, Oct 15, 2007
    #2
    1. Advertising

  3. yes, thanks,
    can you tell me, how can I do it? I have tried it.
    My system is window XP professional SP2

    Tnanks

    "Anthony Jones" <> wrote in message
    news:...
    > "Thanh-Nhan Le" <> wrote in message
    > news:...
    >> Hello,
    >>
    >> I have an ASP application on IIS server:
    >> http://localhost/myApp
    >> I use ASP and a my own VB activex DLL to create a pdf file and write this
    >> file to a subfolder of the Application folder:
    >> http://localhost/myApp/pdfs
    >>
    >> 1-
    >> Over IIS I have set the "write permission" for this subfolder.
    >> But each time I receive the message: "Can't open output file (bad

    > filename,
    >> in use by other application)", error 0x80040202

    >
    >
    > The above step affects http access rights and is irrelevant to what you
    > are
    > doing. The dll is accessing the folder via the windows file system.
    >
    > You need to grant the IUSR_<machinename> user account Read Write access to
    > folder you've created using windows explorer.
    >
    >>
    >> 2- a visual basic test application can call this DLL, generate and write

    > the
    >> file without problem to the folder
    >>
    >> 3- with ASP I generate the file in a normal folder (ie c:\temp), it works
    >> Then my ASP page use FileSystemObject to copy this file to the folder
    >> ..MyApp/pdfs
    >> When I call this page there is no error message, but the programm runs

    > utils
    >> the line, where FileSystemObject to copy the file to the folder, then it
    >> stops there. The process is hung (dead). The file is not copied...
    >>
    >> How can I do?

    >
    > --
    > Anthony Jones - MVP ASP/ASP.NET
    >
    >
     
    Thanh-Nhan Le, Oct 16, 2007
    #3
  4. "Thanh-Nhan Le" <> wrote in message
    news:%23mL3c%...
    > yes, thanks,
    > can you tell me, how can I do it? I have tried it.
    > My system is window XP professional SP2
    >



    In windows explorer navigate to the folder and right mouse click it. Select
    properties from the menu. Click on the security tag. Click Add... If From
    this location is not show the name of the machine click locations... click
    on your machine name and click OK. Enter in box IUSR_<machinename>
    (replacing <machinename> with the name of your machine). Click check names
    and then OK. Make sure the IUSR_<machinename> is selected in the upper list
    and make sure Modify and Read & Execute are checked in the lower list.
    Click OK.


    --
    Anthony Jones - MVP ASP/ASP.NET

    > "Anthony Jones" <> wrote in message
    > news:...
    > > "Thanh-Nhan Le" <> wrote in message
    > > news:...
    > >> Hello,
    > >>
    > >> I have an ASP application on IIS server:
    > >> http://localhost/myApp
    > >> I use ASP and a my own VB activex DLL to create a pdf file and write

    this
    > >> file to a subfolder of the Application folder:
    > >> http://localhost/myApp/pdfs
    > >>
    > >> 1-
    > >> Over IIS I have set the "write permission" for this subfolder.
    > >> But each time I receive the message: "Can't open output file (bad

    > > filename,
    > >> in use by other application)", error 0x80040202

    > >
    > >
    > > The above step affects http access rights and is irrelevant to what you
    > > are
    > > doing. The dll is accessing the folder via the windows file system.
    > >
    > > You need to grant the IUSR_<machinename> user account Read Write access

    to
    > > folder you've created using windows explorer.
    > >
    > >>
    > >> 2- a visual basic test application can call this DLL, generate and

    write
    > > the
    > >> file without problem to the folder
    > >>
    > >> 3- with ASP I generate the file in a normal folder (ie c:\temp), it

    works
    > >> Then my ASP page use FileSystemObject to copy this file to the folder
    > >> ..MyApp/pdfs
    > >> When I call this page there is no error message, but the programm runs

    > > utils
    > >> the line, where FileSystemObject to copy the file to the folder, then

    it
    > >> stops there. The process is hung (dead). The file is not copied...
    > >>
    > >> How can I do?

    > >
    > > --
    > > Anthony Jones - MVP ASP/ASP.NET
    > >
    > >

    >
    >
     
    Anthony Jones, Oct 16, 2007
    #4
  5. I knew this on windows NT 4. But on my machine I can see only 3 tabs:
    General, Sharing und Customize
    Somewhere,. something must be activated?
    Please help

    Thanks

    "Anthony Jones" <> wrote in message
    news:eMUuLJ%...
    > "Thanh-Nhan Le" <> wrote in message
    > news:%23mL3c%...
    >> yes, thanks,
    >> can you tell me, how can I do it? I have tried it.
    >> My system is window XP professional SP2
    >>

    >
    >
    > In windows explorer navigate to the folder and right mouse click it.
    > Select
    > properties from the menu. Click on the security tag. Click Add... If
    > From
    > this location is not show the name of the machine click locations... click
    > on your machine name and click OK. Enter in box IUSR_<machinename>
    > (replacing <machinename> with the name of your machine). Click check
    > names
    > and then OK. Make sure the IUSR_<machinename> is selected in the upper
    > list
    > and make sure Modify and Read & Execute are checked in the lower list.
    > Click OK.
    >
    >
    > --
    > Anthony Jones - MVP ASP/ASP.NET
    >
    >> "Anthony Jones" <> wrote in message
    >> news:...
    >> > "Thanh-Nhan Le" <> wrote in message
    >> > news:...
    >> >> Hello,
    >> >>
    >> >> I have an ASP application on IIS server:
    >> >> http://localhost/myApp
    >> >> I use ASP and a my own VB activex DLL to create a pdf file and write

    > this
    >> >> file to a subfolder of the Application folder:
    >> >> http://localhost/myApp/pdfs
    >> >>
    >> >> 1-
    >> >> Over IIS I have set the "write permission" for this subfolder.
    >> >> But each time I receive the message: "Can't open output file (bad
    >> > filename,
    >> >> in use by other application)", error 0x80040202
    >> >
    >> >
    >> > The above step affects http access rights and is irrelevant to what you
    >> > are
    >> > doing. The dll is accessing the folder via the windows file system.
    >> >
    >> > You need to grant the IUSR_<machinename> user account Read Write access

    > to
    >> > folder you've created using windows explorer.
    >> >
    >> >>
    >> >> 2- a visual basic test application can call this DLL, generate and

    > write
    >> > the
    >> >> file without problem to the folder
    >> >>
    >> >> 3- with ASP I generate the file in a normal folder (ie c:\temp), it

    > works
    >> >> Then my ASP page use FileSystemObject to copy this file to the folder
    >> >> ..MyApp/pdfs
    >> >> When I call this page there is no error message, but the programm runs
    >> > utils
    >> >> the line, where FileSystemObject to copy the file to the folder, then

    > it
    >> >> stops there. The process is hung (dead). The file is not copied...
    >> >>
    >> >> How can I do?
    >> >
    >> > --
    >> > Anthony Jones - MVP ASP/ASP.NET
    >> >
    >> >

    >>
    >>

    >
    >
     
    Thanh-Nhan Le, Oct 16, 2007
    #5
  6. You need to turn off "Simple File Sharing":
    http://support.microsoft.com/kb/304040

    Thanh-Nhan Le wrote:
    > I knew this on windows NT 4. But on my machine I can see only 3 tabs:
    > General, Sharing und Customize
    > Somewhere,. something must be activated?
    > Please help
    >
    > Thanks
    >
    > "Anthony Jones" <> wrote in message
    > news:eMUuLJ%...
    >> "Thanh-Nhan Le" <> wrote in message
    >> news:%23mL3c%...
    >>> yes, thanks,
    >>> can you tell me, how can I do it? I have tried it.
    >>> My system is window XP professional SP2
    >>>

    >>
    >>
    >> In windows explorer navigate to the folder and right mouse click it.
    >> Select
    >> properties from the menu. Click on the security tag. Click Add...
    >> If From
    >> this location is not show the name of the machine click locations...
    >> click on your machine name and click OK. Enter in box
    >> IUSR_<machinename> (replacing <machinename> with the name of your
    >> machine). Click check names
    >> and then OK. Make sure the IUSR_<machinename> is selected in the
    >> upper list
    >> and make sure Modify and Read & Execute are checked in the lower
    >> list. Click OK.
    >>
    >>
    >> --
    >> Anthony Jones - MVP ASP/ASP.NET
    >>
    >>> "Anthony Jones" <> wrote in message
    >>> news:...
    >>>> "Thanh-Nhan Le" <> wrote in message
    >>>> news:...
    >>>>> Hello,
    >>>>>
    >>>>> I have an ASP application on IIS server:
    >>>>> http://localhost/myApp
    >>>>> I use ASP and a my own VB activex DLL to create a pdf file and
    >>>>> write this file to a subfolder of the Application folder:
    >>>>> http://localhost/myApp/pdfs
    >>>>>
    >>>>> 1-
    >>>>> Over IIS I have set the "write permission" for this subfolder.
    >>>>> But each time I receive the message: "Can't open output file (bad
    >>>>> filename, in use by other application)", error 0x80040202
    >>>>
    >>>>
    >>>> The above step affects http access rights and is irrelevant to
    >>>> what you are
    >>>> doing. The dll is accessing the folder via the windows file
    >>>> system.
    >>>>
    >>>> You need to grant the IUSR_<machinename> user account Read Write
    >>>> access to folder you've created using windows explorer.
    >>>>
    >>>>>
    >>>>> 2- a visual basic test application can call this DLL, generate
    >>>>> and write the file without problem to the folder
    >>>>>
    >>>>> 3- with ASP I generate the file in a normal folder (ie c:\temp),
    >>>>> it works Then my ASP page use FileSystemObject to copy this file
    >>>>> to the folder ..MyApp/pdfs
    >>>>> When I call this page there is no error message, but the programm
    >>>>> runs utils the line, where FileSystemObject to copy the file to
    >>>>> the folder, then it stops there. The process is hung (dead). The
    >>>>> file is not copied...
    >>>>>
    >>>>> How can I do?
    >>>>
    >>>> --
    >>>> Anthony Jones - MVP ASP/ASP.NET


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Oct 16, 2007
    #6
  7. Thanks

    "Bob Barrows [MVP]" <> wrote in message
    news:uAlNQD$...
    > You need to turn off "Simple File Sharing":
    > http://support.microsoft.com/kb/304040
    >
    > Thanh-Nhan Le wrote:
    >> I knew this on windows NT 4. But on my machine I can see only 3 tabs:
    >> General, Sharing und Customize
    >> Somewhere,. something must be activated?
    >> Please help
    >>
    >> Thanks
    >>
    >> "Anthony Jones" <> wrote in message
    >> news:eMUuLJ%...
    >>> "Thanh-Nhan Le" <> wrote in message
    >>> news:%23mL3c%...
    >>>> yes, thanks,
    >>>> can you tell me, how can I do it? I have tried it.
    >>>> My system is window XP professional SP2
    >>>>
    >>>
    >>>
    >>> In windows explorer navigate to the folder and right mouse click it.
    >>> Select
    >>> properties from the menu. Click on the security tag. Click Add...
    >>> If From
    >>> this location is not show the name of the machine click locations...
    >>> click on your machine name and click OK. Enter in box
    >>> IUSR_<machinename> (replacing <machinename> with the name of your
    >>> machine). Click check names
    >>> and then OK. Make sure the IUSR_<machinename> is selected in the
    >>> upper list
    >>> and make sure Modify and Read & Execute are checked in the lower
    >>> list. Click OK.
    >>>
    >>>
    >>> --
    >>> Anthony Jones - MVP ASP/ASP.NET
    >>>
    >>>> "Anthony Jones" <> wrote in message
    >>>> news:...
    >>>>> "Thanh-Nhan Le" <> wrote in message
    >>>>> news:...
    >>>>>> Hello,
    >>>>>>
    >>>>>> I have an ASP application on IIS server:
    >>>>>> http://localhost/myApp
    >>>>>> I use ASP and a my own VB activex DLL to create a pdf file and
    >>>>>> write this file to a subfolder of the Application folder:
    >>>>>> http://localhost/myApp/pdfs
    >>>>>>
    >>>>>> 1-
    >>>>>> Over IIS I have set the "write permission" for this subfolder.
    >>>>>> But each time I receive the message: "Can't open output file (bad
    >>>>>> filename, in use by other application)", error 0x80040202
    >>>>>
    >>>>>
    >>>>> The above step affects http access rights and is irrelevant to
    >>>>> what you are
    >>>>> doing. The dll is accessing the folder via the windows file
    >>>>> system.
    >>>>>
    >>>>> You need to grant the IUSR_<machinename> user account Read Write
    >>>>> access to folder you've created using windows explorer.
    >>>>>
    >>>>>>
    >>>>>> 2- a visual basic test application can call this DLL, generate
    >>>>>> and write the file without problem to the folder
    >>>>>>
    >>>>>> 3- with ASP I generate the file in a normal folder (ie c:\temp),
    >>>>>> it works Then my ASP page use FileSystemObject to copy this file
    >>>>>> to the folder ..MyApp/pdfs
    >>>>>> When I call this page there is no error message, but the programm
    >>>>>> runs utils the line, where FileSystemObject to copy the file to
    >>>>>> the folder, then it stops there. The process is hung (dead). The
    >>>>>> file is not copied...
    >>>>>>
    >>>>>> How can I do?
    >>>>>
    >>>>> --
    >>>>> Anthony Jones - MVP ASP/ASP.NET

    >
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >
     
    Thanh-Nhan Le, Oct 16, 2007
    #7
    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. Lars Pedersen

    Usercontrol in webforms subfolder

    Lars Pedersen, Jul 6, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    412
    Lars Pedersen
    Jul 6, 2003
  2. Philippe Meunier
    Replies:
    3
    Views:
    1,736
    John Saunders
    Oct 18, 2003
  3. Paul Shapiro
    Replies:
    2
    Views:
    509
    Paul Shapiro
    Mar 12, 2008
  4. Replies:
    3
    Views:
    171
    Bob Barrows [MVP]
    Sep 1, 2005
  5. James Jones

    INETSERVER.ASP.DB......whered it go?

    James Jones, Jun 21, 2006, in forum: ASP General
    Replies:
    5
    Views:
    143
    James Jones
    Jun 22, 2006
Loading...

Share This Page