Ask a Question related to ASP, Design and Development.
-
Glenn #1
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" <aaron@TRASHaspfaq.com> wrote in message
news:e1S56SMbDHA.2632@TK2MSFTNGP09.phx.gbl...> You can append the filename to this:
>
> response.write server.mappath("/virtual_directory/")
>
>
>
> "Glenn" <glennt@XXREMOVEXX.hotmail.com> wrote in message
> news:025501c36cc4$18247c60$a301280a@phx.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
-
virtual directory
Our corporate website uses coldfusion. We have developed a web time entry system that also uses coldfusion. I am trying to setup the new timentry... -
IIS Virtual Directory Create Failure :(
System.UnauthorizedAccessException: Access is denied. at System.DirectoryServices.Interop.IAds.SetInfo() at... -
IIS Virtual Directory Create Failure in Web Service :(
System.UnauthorizedAccessException: Access is denied. at System.DirectoryServices.Interop.IAds.SetInfo() at... -
Have to Be A Virtual Directory?
I have a project named NET. It has .aspx and one .asmx files. This NET is a virtual directory and application in IIS: - All .aspx and one .asmx and... -
How to create a new Virtual Directory?
I have bought an asp.net host,but there is only one Virtual Directory. How to create a new Virtual Directory in an ASP.NET application? Thanks! -
Aaron Bertrand - MVP #2
Re: Create file in virtual directory
> Remember that e:\inetpub\wwwroot\virtual_dir does not
"Remember "? Did you misspell "I forgot to tell you "? Where in your> actually exist on the server.
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.
This means that IUSR_WebServer does not have adequate permissions to> Error Type:
> Microsoft VBScript runtime (0x800A004C)
> Path not found
whatever machine is hosting e:\. See [url]http://www.aspfaq.com/2168[/url]
Aaron Bertrand - MVP Guest
-
Glenn #3
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" <aaron@TRASHaspfaq.com> wrote in message
news:egMIaeMbDHA.2328@TK2MSFTNGP09.phx.gbl...does>> > 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> 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
-
Chris Hohmann #4
Re: Create file in virtual directory
"Glenn" <glennt@XXREMOVE.hotmail.com> wrote in message
news:uZl7SnMbDHA.1600@TK2MSFTNGP09.phx.gbl...that> I am confused here. I have included my original post below. I statedvia> I have created a virtual directory and that I am trying to access itI> filesystemobject. When I do so, I am getting a path not found error.which> created another virtual directory which points to e:\inetpub\wwwroot,again,> I would think that IUSR_WebServer would have access to. However,operating> e:\inetpub\wwwroot\newvirtualdirectory does not exist within thedoes> system, but e:\inetpub\wwwroot, which the virtual directory points to,Please show code. Absent that, your post is the equivalent of "I'm doing> exist. Still, I am getting the path not found error when I am using
> filesystemobject to access server.mappath("/virtual_directory/").
some stuff and it doesn't work."
Chris Hohmann Guest
-
Glenn #5
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.2476@tk2msftngp13.phx.gbl...> "Glenn" <glennt@XXREMOVE.hotmail.com> wrote in message
> news:uZl7SnMbDHA.1600@TK2MSFTNGP09.phx.gbl...> that> > I am confused here. I have included my original post below. I stated> via> > I have created a virtual directory and that I am trying to access it> I> > filesystemobject. When I do so, I am getting a path not found error.> which> > created another virtual directory which points to e:\inetpub\wwwroot,> again,> > I would think that IUSR_WebServer would have access to. However,> operating> > e:\inetpub\wwwroot\newvirtualdirectory does not exist within the> does> > system, but e:\inetpub\wwwroot, which the virtual directory points to,>> > 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
-
Tom B #6
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" <glennt@XXREMOVE.hotmail.com> wrote in message
news:uHCfZrNbDHA.2960@tk2msftngp13.phx.gbl...the> 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 pointeddefault,> virtual directory to "e:\inetpub\wwwroot", isn't that directory, byaccess> 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 onlyit> operating system recognized directories, whether they are local or network
> shares.
>
> "Tom B" <shuckle@hotmail.com> wrote in message
> news:uquvuWNbDHA.2016@TK2MSFTNGP10.phx.gbl...> telling> > 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> should> > it to do.
> >
> > "Glenn" <glennt@XXREMOVE.hotmail.com> wrote in message
> > news:OqmWr$MbDHA.424@TK2MSFTNGP10.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> e:\inetpub\wwwroot\novatest> > be> > > expected because it is very basic coding. But> stated> > directory> > > does not exist at the system operating system level. However
> > > [url]http://server/novatest[/url] does exist because "novatest" is a virtual> > that> > > which points to "e:\inetpub\wwwroot\" (this is just to prove the point> > > it is not working).
> > >
> > >
> > > "Chris Hohmann" <hohmannATyahooDOTcom> wrote in message
> > > news:u097U1MbDHA.2476@tk2msftngp13.phx.gbl...
> > > > "Glenn" <glennt@XXREMOVE.hotmail.com> wrote in message
> > > > news:uZl7SnMbDHA.1600@TK2MSFTNGP09.phx.gbl...
> > > > > I am confused here. I have included my original post below. I> > > > that
> > > > > I have created a virtual directory and that I am trying to accessusing> error.> > > > via
> > > > > filesystemobject. When I do so, I am getting a path not found> e:\inetpub\wwwroot,> > > > I
> > > > > created another virtual directory which points to> to,> > > > 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> > > > does
> > > > > exist. Still, I am getting the path not found error when I am> doing> > > > > filesystemobject to access server.mappath("/virtual_directory/").
> > > >
> > > > Please show code. Absent that, your post is the equivalent of "I'm>> >> > > > some stuff and it doesn't work."
> > > >
> > > >
> > >
> > >
> >
>
Tom B Guest
-
Chris Hohmann #7
Re: Create file in virtual directory
"Glenn" <glennt@XXREMOVE.hotmail.com> wrote in message
news:uHCfZrNbDHA.2960@tk2msftngp13.phx.gbl...able to> I obviously am not understanding what you all understand, nor am Ia> get my questions and points across. Thanks for the efforts. What isanother> virtual directory? Is it not just a pointer in IIS that points toanother> location, whether on the same machine as IIS or a network share onsettings)?> server (which is why you would use the user name and passwordthe> Tom, if it is just a pointer, why would you say that the directory
> "e:\inetpub\wwwroot\novatest" does exist (which it does not becauseis no> virtual directory is just pointing to "e:\inetpub\wwwroot" and therepointed the> subdirectory of "novatest" there)? Because, during my testing Idefault,> virtual directory to "e:\inetpub\wwwroot", isn't that directory, bythe> accessible to "IUSR_machinename"?
>
> I am going to assume, because nothing to the contrary has been said inaccess> responses and because of my testing, that filesystemobject can onlynetwork> operating system recognized directories, whether they are local orPlease answer the following> shares.
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



Reply With Quote

