L
laura
I'm trying to understand fully Server.MapPath. I am writing an intranet for
a small company and want to be able to put some files accessible to all,
hyperlinked from the intranet and therefore, outside of the website area -
the idea being that I want staff to be able to copy files into folders that
can be accessed by hyperlinks on the intranet pages.
I've had a problem separating them from the intranet HTML and ASP pages,
which is obviously important as I do not want staff to be able to amend the
intranet pages themselves.
At the moment I have a structure that looks like this.
c:\inetpub\intranet where all the HTML and ASP files will be held,
i.e., the root of my "website".
the files to be copied into folders will go into subfolders and I'm sure
this is where I have gone wrong.. they should go somewhere else, but I am
not sure then how to hyperlink to files that are not within the "website".
c:\inetpub\intranet\intranetfiles
I tried putting the files in a folder "away" from the intranet HTML files...
c:\inetpub\intranetfiles - but that was one step back from the website and
I could not link to them for some reason. I do not know how to link to files
that are somewhere else on the server, e.g., c:\intranetfiles. I want staff
to "see" and access that folder, but not the intranet website.. I'm a bit
stuck on this.
Can someone explain to me why it is that Option (A) below returns
c:\inetpub\intranet and Option (B) returns
C:\WINDOWS\SYSTEM\inetsrv\iisadmin. Is it because the inetsrv folder is part
of the "website"? this has confused me.
A) Response.Write Server.Mappath("/") & "<br>"
B) Response.Write Server.Mappath("\iisadmin") & "<br>"
Thanks
Laura TD
a small company and want to be able to put some files accessible to all,
hyperlinked from the intranet and therefore, outside of the website area -
the idea being that I want staff to be able to copy files into folders that
can be accessed by hyperlinks on the intranet pages.
I've had a problem separating them from the intranet HTML and ASP pages,
which is obviously important as I do not want staff to be able to amend the
intranet pages themselves.
At the moment I have a structure that looks like this.
c:\inetpub\intranet where all the HTML and ASP files will be held,
i.e., the root of my "website".
the files to be copied into folders will go into subfolders and I'm sure
this is where I have gone wrong.. they should go somewhere else, but I am
not sure then how to hyperlink to files that are not within the "website".
c:\inetpub\intranet\intranetfiles
I tried putting the files in a folder "away" from the intranet HTML files...
c:\inetpub\intranetfiles - but that was one step back from the website and
I could not link to them for some reason. I do not know how to link to files
that are somewhere else on the server, e.g., c:\intranetfiles. I want staff
to "see" and access that folder, but not the intranet website.. I'm a bit
stuck on this.
Can someone explain to me why it is that Option (A) below returns
c:\inetpub\intranet and Option (B) returns
C:\WINDOWS\SYSTEM\inetsrv\iisadmin. Is it because the inetsrv folder is part
of the "website"? this has confused me.
A) Response.Write Server.Mappath("/") & "<br>"
B) Response.Write Server.Mappath("\iisadmin") & "<br>"
Thanks
Laura TD