Professional Web Applications Themes

Create file in virtual directory - ASP

Does not work. Remember that e:\inetpub\wwwroot\virtual_dir does not actually exist on the server. However, I can browse to it - [url]http://server/virtual_dir[/url] Error Type: Microsoft VBScript runtime (0x800A004C) Path not found "Aaron Bertrand - MVP" <aaronTRASHaspfaq.com> wrote in message news:e1S56SMbDHA.2632TK2MSFTNGP09.phx.gbl... > You can append the filename to this: > > response.write server.mappath("/virtual_directory/") > > > > "Glenn" <glenntXXREMOVEXX.hotmail.com> wrote in message > news:025501c36cc4$18247c60$a301280aphx.gbl... > > I am using the filesystemobject in an ASP script. What I > > am trying to do is create a file in a virtual directory. > > If filesystemobject can do this, I cannot figure out ...

  1. #1

    Default Re: Create file in virtual directory

    Does not work. Remember that e:\inetpub\wwwroot\virtual_dir does not
    actually exist on the server. However, I can browse to it -
    [url]http://server/virtual_dir[/url]

    Error Type:
    Microsoft VBScript runtime (0x800A004C)
    Path not found


    "Aaron Bertrand - MVP" <aaronTRASHaspfaq.com> wrote in message
    news:e1S56SMbDHA.2632TK2MSFTNGP09.phx.gbl...
    > You can append the filename to this:
    >
    > response.write server.mappath("/virtual_directory/")
    >
    >
    >
    > "Glenn" <glenntXXREMOVEXX.hotmail.com> wrote in message
    > news:025501c36cc4$18247c60$a301280aphx.gbl...
    > > I am using the filesystemobject in an ASP script. What I
    > > am trying to do is create a file in a virtual directory.
    > > If filesystemobject can do this, I cannot figure out
    > > how. I am thinking that filesystemobject cannot do
    > > this. Can anyone point me in the right direction?
    >
    >

    Glenn Guest

  2. #2

    Default Re: Create file in virtual directory

    > Remember that e:\inetpub\wwwroot\virtual_dir does not
    > actually exist on the server.
    "Remember "? Did you misspell "I forgot to tell you "? Where in your
    original post do you say anything about there being more than one server
    involved? Maybe you have a different definition, but virtual directory does
    not automatically mean that you are mapping to a different machine.
    > Error Type:
    > Microsoft VBScript runtime (0x800A004C)
    > Path not found
    This means that IUSR_WebServer does not have adequate permissions to
    whatever machine is hosting e:\. See [url]http://www.aspfaq.com/2168[/url]


    Aaron Bertrand - MVP Guest

  3. #3

    Default Re: Create file in virtual directory

    I am confused here. I have included my original post below. I stated that
    I have created a virtual directory and that I am trying to access it via
    filesystemobject. When I do so, I am getting a path not found error. I
    created another virtual directory which points to e:\inetpub\wwwroot, which
    I would think that IUSR_WebServer would have access to. However, again,
    e:\inetpub\wwwroot\newvirtualdirectory does not exist within the operating
    system, but e:\inetpub\wwwroot, which the virtual directory points to, does
    exist. Still, I am getting the path not found error when I am using
    filesystemobject to access server.mappath("/virtual_directory/").



    --- Original Post ---
    I am using the filesystemobject in an ASP script. What I
    am trying to do is create a file in a virtual directory.
    If filesystemobject can do this, I cannot figure out
    how. I am thinking that filesystemobject cannot do
    this. Can anyone point me in the right direction?


    "Aaron Bertrand - MVP" <aaronTRASHaspfaq.com> wrote in message
    news:egMIaeMbDHA.2328TK2MSFTNGP09.phx.gbl...
    > > Remember that e:\inetpub\wwwroot\virtual_dir does not
    > > actually exist on the server.
    >
    > "Remember "? Did you misspell "I forgot to tell you "? Where in your
    > original post do you say anything about there being more than one server
    > involved? Maybe you have a different definition, but virtual directory
    does
    > not automatically mean that you are mapping to a different machine.
    >
    > > Error Type:
    > > Microsoft VBScript runtime (0x800A004C)
    > > Path not found
    >
    > This means that IUSR_WebServer does not have adequate permissions to
    > whatever machine is hosting e:\. See [url]http://www.aspfaq.com/2168[/url]
    >
    >

    Glenn Guest

  4. #4

    Default Re: Create file in virtual directory

    "Glenn" <glenntXXREMOVE.hotmail.com> wrote in message
    news:uZl7SnMbDHA.1600TK2MSFTNGP09.phx.gbl...
    > I am confused here. I have included my original post below. I stated
    that
    > I have created a virtual directory and that I am trying to access it
    via
    > filesystemobject. When I do so, I am getting a path not found error.
    I
    > created another virtual directory which points to e:\inetpub\wwwroot,
    which
    > I would think that IUSR_WebServer would have access to. However,
    again,
    > e:\inetpub\wwwroot\newvirtualdirectory does not exist within the
    operating
    > system, but e:\inetpub\wwwroot, which the virtual directory points to,
    does
    > exist. Still, I am getting the path not found error when I am using
    > filesystemobject to access server.mappath("/virtual_directory/").
    Please show code. Absent that, your post is the equivalent of "I'm doing
    some stuff and it doesn't work."


    Chris Hohmann Guest

  5. #5

    Default Re: Create file in virtual directory

    set fso = server.createobject("scripting.filesystemobject")
    fn = server.mappath("/novatest/circ" & ts & counter & ".in")
    response.write fn & "<br>"
    response.flush
    set f = fso.createtextfile(fn, false)

    Microsoft VBScript runtime error '800a004c'
    Path not found

    fn returns "e:\inetpub\wwwroot\novatest\circ200308271212371.i n" as should be
    expected because it is very basic coding. But e:\inetpub\wwwroot\novatest
    does not exist at the system operating system level. However
    [url]http://server/novatest[/url] does exist because "novatest" is a virtual directory
    which points to "e:\inetpub\wwwroot\" (this is just to prove the point that
    it is not working).


    "Chris Hohmann" <hohmannATyahooDOTcom> wrote in message
    news:u097U1MbDHA.2476tk2msftngp13.phx.gbl...
    > "Glenn" <glenntXXREMOVE.hotmail.com> wrote in message
    > news:uZl7SnMbDHA.1600TK2MSFTNGP09.phx.gbl...
    > > I am confused here. I have included my original post below. I stated
    > that
    > > I have created a virtual directory and that I am trying to access it
    > via
    > > filesystemobject. When I do so, I am getting a path not found error.
    > I
    > > created another virtual directory which points to e:\inetpub\wwwroot,
    > which
    > > I would think that IUSR_WebServer would have access to. However,
    > again,
    > > e:\inetpub\wwwroot\newvirtualdirectory does not exist within the
    > operating
    > > system, but e:\inetpub\wwwroot, which the virtual directory points to,
    > does
    > > exist. Still, I am getting the path not found error when I am using
    > > filesystemobject to access server.mappath("/virtual_directory/").
    >
    > Please show code. Absent that, your post is the equivalent of "I'm doing
    > some stuff and it doesn't work."
    >
    >

    Glenn Guest

  6. #6

    Default Re: Create file in virtual directory

    You're right, there isn't a folder called novatest. I misunderstood. When
    you created the novatest virtual directory, you said it was located at
    e:\inetpub\wwwroot so your call to server.mappath should have returned that.

    change...
    fn = server.mappath("/novatest/circ" & ts & counter & ".in")
    to
    fn=server.mappath("circ/" & ts & counter & ".in")


    However, the real problem is still that the directory does not give WRITE
    permission to the anonymous user.




    "Glenn" <glenntXXREMOVE.hotmail.com> wrote in message
    news:uHCfZrNbDHA.2960tk2msftngp13.phx.gbl...
    > I obviously am not understanding what you all understand, nor am I able to
    > get my questions and points across. Thanks for the efforts. What is a
    > virtual directory? Is it not just a pointer in IIS that points to another
    > location, whether on the same machine as IIS or a network share on another
    > server (which is why you would use the user name and password settings)?
    > Tom, if it is just a pointer, why would you say that the directory
    > "e:\inetpub\wwwroot\novatest" does exist (which it does not because the
    > virtual directory is just pointing to "e:\inetpub\wwwroot" and there is no
    > subdirectory of "novatest" there)? Because, during my testing I pointed
    the
    > virtual directory to "e:\inetpub\wwwroot", isn't that directory, by
    default,
    > accessible to "IUSR_machinename"?
    >
    > I am going to assume, because nothing to the contrary has been said in the
    > responses and because of my testing, that filesystemobject can only
    access
    > operating system recognized directories, whether they are local or network
    > shares.
    >
    > "Tom B" <shucklehotmail.com> wrote in message
    > news:uquvuWNbDHA.2016TK2MSFTNGP10.phx.gbl...
    > > A virtual directory DOES exist somewhere. If you created it in
    > > e:\inetpub\wwwroot and called it novatest then there IS a folder on your
    > > machine called e:\inetpub\wwwroot\novatest
    > > However, I would bet that the anonymous user (IUSR_machinename) does not
    > > have permission to write files to that directory, which your code is
    > telling
    > > it to do.
    > >
    > > "Glenn" <glenntXXREMOVE.hotmail.com> wrote in message
    > > news:OqmWr$MbDHA.424TK2MSFTNGP10.phx.gbl...
    > > > set fso = server.createobject("scripting.filesystemobject")
    > > > fn = server.mappath("/novatest/circ" & ts & counter & ".in")
    > > > response.write fn & "<br>"
    > > > response.flush
    > > > set f = fso.createtextfile(fn, false)
    > > >
    > > > Microsoft VBScript runtime error '800a004c'
    > > > Path not found
    > > >
    > > > fn returns "e:\inetpub\wwwroot\novatest\circ200308271212371.i n" as
    > should
    > > be
    > > > expected because it is very basic coding. But
    > e:\inetpub\wwwroot\novatest
    > > > does not exist at the system operating system level. However
    > > > [url]http://server/novatest[/url] does exist because "novatest" is a virtual
    > > directory
    > > > which points to "e:\inetpub\wwwroot\" (this is just to prove the point
    > > that
    > > > it is not working).
    > > >
    > > >
    > > > "Chris Hohmann" <hohmannATyahooDOTcom> wrote in message
    > > > news:u097U1MbDHA.2476tk2msftngp13.phx.gbl...
    > > > > "Glenn" <glenntXXREMOVE.hotmail.com> wrote in message
    > > > > news:uZl7SnMbDHA.1600TK2MSFTNGP09.phx.gbl...
    > > > > > I am confused here. I have included my original post below. I
    > stated
    > > > > that
    > > > > > I have created a virtual directory and that I am trying to access
    it
    > > > > via
    > > > > > filesystemobject. When I do so, I am getting a path not found
    > error.
    > > > > I
    > > > > > created another virtual directory which points to
    > e:\inetpub\wwwroot,
    > > > > which
    > > > > > I would think that IUSR_WebServer would have access to. However,
    > > > > again,
    > > > > > e:\inetpub\wwwroot\newvirtualdirectory does not exist within the
    > > > > operating
    > > > > > system, but e:\inetpub\wwwroot, which the virtual directory points
    > to,
    > > > > does
    > > > > > exist. Still, I am getting the path not found error when I am
    using
    > > > > > filesystemobject to access server.mappath("/virtual_directory/").
    > > > >
    > > > > Please show code. Absent that, your post is the equivalent of "I'm
    > doing
    > > > > some stuff and it doesn't work."
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Tom B Guest

  7. #7

    Default Re: Create file in virtual directory

    "Glenn" <glenntXXREMOVE.hotmail.com> wrote in message
    news:uHCfZrNbDHA.2960tk2msftngp13.phx.gbl...
    > I obviously am not understanding what you all understand, nor am I
    able to
    > get my questions and points across. Thanks for the efforts. What is
    a
    > virtual directory? Is it not just a pointer in IIS that points to
    another
    > location, whether on the same machine as IIS or a network share on
    another
    > server (which is why you would use the user name and password
    settings)?
    > Tom, if it is just a pointer, why would you say that the directory
    > "e:\inetpub\wwwroot\novatest" does exist (which it does not because
    the
    > virtual directory is just pointing to "e:\inetpub\wwwroot" and there
    is no
    > subdirectory of "novatest" there)? Because, during my testing I
    pointed the
    > virtual directory to "e:\inetpub\wwwroot", isn't that directory, by
    default,
    > accessible to "IUSR_machinename"?
    >
    > I am going to assume, because nothing to the contrary has been said in
    the
    > responses and because of my testing, that filesystemobject can only
    access
    > operating system recognized directories, whether they are local or
    network
    > shares.
    Please answer the following
    1. What is the value of IIS Manager>[Website]>Properties>Home
    Directory>Local Path?
    2. What is the value of IIS
    Manager>[Website]>Novatest>Properties>Virtual Directory>Local Path?
    3. What is the name the other Virtual Directory pointing to
    e:\inetpub\wwwroot?
    4. Assuming the answer to item 3 is "OtherVD", what is the value of IIS
    Manager>[Website]>OtherVD>Properties>Virtual Directory>Local Path?

    Is seems unlikely that, to quote your previous post, '...the virtual
    directory is just pointing to "e:\inetpub\wwwroot"'

    -Chris



    Chris Hohmann Guest

Similar Threads

  1. virtual directory
    By triadwm in forum Macromedia Flash Flashcom
    Replies: 15
    Last Post: November 19th, 09:35 PM
  2. IIS Virtual Directory Create Failure :(
    By Eskimo in forum ASP.NET Web Services
    Replies: 4
    Last Post: November 22nd, 04:57 PM
  3. IIS Virtual Directory Create Failure in Web Service :(
    By Eskimo in forum ASP.NET Security
    Replies: 5
    Last Post: November 8th, 05:49 PM
  4. Have to Be A Virtual Directory?
    By Chan in forum ASP.NET Web Services
    Replies: 5
    Last Post: January 19th, 01:49 PM
  5. How to create a new Virtual Directory?
    By qiuji in forum ASP.NET General
    Replies: 0
    Last Post: August 12th, 07:02 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139