L
Laphan
Hi All
Sorry to be irate, but the whole concept of Server.MapPaths really has me in
a tiswas!!
In order to confirm once and for all, could you please advise me on the
following:
1) There is no difference in putting '/' or '\' in the Server.MapPath param,
eg Server.MapPath("/fred/test.asp") or Server.MapPath("\fred\test.asp") -
they work the same - correct?
2) I'm finally using my ISP's 'off-world' folder to store my Access DB (yes
I know I should be using MSSQL) and I am trying to link my ASP files back to
it using Server.MapPath in such a way that my ISP's file server structure
and my local file server structure can read the same site without me having
to have different connection strings for remote and local work.
To explain my problem, please note the following:
There are 2 folders to start with 1 called <htdocs> and 1 called <private>.
The htdocs is the web share folder and the <private> one is the 'off-world'
database store. A common practise I believe with IIS ISPs.
In the <htdocs> I have the following folder structures:
root level ... some ASP inc files ...
<incs> folder ... some ASP inc files ... <sprocs> folder ... some ASP inc
files ...
<user-data> <pics> my uploaded pics
Now this is where the weirdie comes. If my ASP inc file is in the
<incs><sprocs> level my Server.MapPath for accessing the <pics> folder is
"../user-data/pics/", however if I have an ASP inc file in the <incs> level
then my MapPath is "../../user-data/pics"
How is that?? Surely the <sprocs> folder would need more '../' than the
<incs> folder which is one level up?
If somebody could just give me a dummies run-down on how this works I would
really appreciate it as I just don't get it.
Thanks
Laphan
Sorry to be irate, but the whole concept of Server.MapPaths really has me in
a tiswas!!
In order to confirm once and for all, could you please advise me on the
following:
1) There is no difference in putting '/' or '\' in the Server.MapPath param,
eg Server.MapPath("/fred/test.asp") or Server.MapPath("\fred\test.asp") -
they work the same - correct?
2) I'm finally using my ISP's 'off-world' folder to store my Access DB (yes
I know I should be using MSSQL) and I am trying to link my ASP files back to
it using Server.MapPath in such a way that my ISP's file server structure
and my local file server structure can read the same site without me having
to have different connection strings for remote and local work.
To explain my problem, please note the following:
There are 2 folders to start with 1 called <htdocs> and 1 called <private>.
The htdocs is the web share folder and the <private> one is the 'off-world'
database store. A common practise I believe with IIS ISPs.
In the <htdocs> I have the following folder structures:
root level ... some ASP inc files ...
<incs> folder ... some ASP inc files ... <sprocs> folder ... some ASP inc
files ...
<user-data> <pics> my uploaded pics
Now this is where the weirdie comes. If my ASP inc file is in the
<incs><sprocs> level my Server.MapPath for accessing the <pics> folder is
"../user-data/pics/", however if I have an ASP inc file in the <incs> level
then my MapPath is "../../user-data/pics"
How is that?? Surely the <sprocs> folder would need more '../' than the
<incs> folder which is one level up?
If somebody could just give me a dummies run-down on how this works I would
really appreciate it as I just don't get it.
Thanks
Laphan