I have a happily working set of asp pages which read from the database
via include file "./_private/include/database.mdb".
However, when I try to gain access to this database on pages one
folder removed using "../_private/include/database.mdb", the pages
won't display. This whole system works fine on my home test server
(iis.5.0), but 'breaks' when uploaded to the public server. I know the
path to database is correct because the upper level pages are
displaying without problem. I am utterly perplexed and any suggestions
would be welcome. I'm using Acess database.
Thank you 8 1616
supasnail wrote on 02 nov 2006 in microsoft.public.inetserver.asp.general:
I have a happily working set of asp pages which read from the database
via include file "./_private/include/database.mdb".
However, when I try to gain access to this database on pages one
folder removed using "../_private/include/database.mdb", the pages
won't display. This whole system works fine on my home test server
(iis.5.0), but 'breaks' when uploaded to the public server. I know the
path to database is correct because the upper level pages are
displaying without problem. I am utterly perplexed and any suggestions
would be welcome. I'm using Acess database.
Use absolute references or server.mapPath() them.
Include files just drop their text content into the calling file,
so the current virtual directory is that of the same calling file.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
"supasnail" <su*******@gmail.comwrote in message
news:11*********************@h54g2000cwb.googlegro ups.com...
>I have a happily working set of asp pages which read from the database
via include file "./_private/include/database.mdb".
However, when I try to gain access to this database on pages one
folder removed using "../_private/include/database.mdb", the pages
won't display. This whole system works fine on my home test server
(iis.5.0), but 'breaks' when uploaded to the public server. I know the
path to database is correct because the upper level pages are
displaying without problem. I am utterly perplexed and any suggestions
would be welcome. I'm using Acess database.
Thank you
Parent paths (using ../../) are enabled by default on IIS5. The default for
IIS6 is that they are not enabled, so this may be the problem if your public
server is windows 2003. If it's your server, you can enable parent paths,
but this is not recommended. If it's not your server, you are unlikely to
persuade your host to enable parent paths. Consequently, you will need to
use a full path in your connection string.
This can be obtained by creating a file called mappath.asp with this
content:
<%Response.Write Server.Mappath("mappath.asp")%>
and placing it in the include folder. Then browse to it.
( www.mydomain/root/_private/include/mappath.asp). It will display the full
path.
--
Mike Brind
I'm not quite sure what you're saying, If I use absolute references on
each page for the database then I would have to change over 30 files
when I upload to the public server after testing, similarly if I use an
absolute path to the include file. Also I am having trouble
understanding why this entire web site functions correctly on my test
server and not on the public server. It only breaks when i attempt to
call the database from pages one directory removed. Have I
misunderstood the advice?
Evertjan. wrote:
supasnail wrote on 02 nov 2006 in microsoft.public.inetserver.asp.general:
I have a happily working set of asp pages which read from the database
via include file "./_private/include/database.mdb".
However, when I try to gain access to this database on pages one
folder removed using "../_private/include/database.mdb", the pages
won't display. This whole system works fine on my home test server
(iis.5.0), but 'breaks' when uploaded to the public server. I know the
path to database is correct because the upper level pages are
displaying without problem. I am utterly perplexed and any suggestions
would be welcome. I'm using Acess database.
Use absolute references or server.mapPath() them.
Include files just drop their text content into the calling file,
so the current virtual directory is that of the same calling file.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
ahh, I understand, thank you. I'll give that a go.
Mike Brind wrote:
"supasnail" <su*******@gmail.comwrote in message
news:11*********************@h54g2000cwb.googlegro ups.com...
I have a happily working set of asp pages which read from the database
via include file "./_private/include/database.mdb".
However, when I try to gain access to this database on pages one
folder removed using "../_private/include/database.mdb", the pages
won't display. This whole system works fine on my home test server
(iis.5.0), but 'breaks' when uploaded to the public server. I know the
path to database is correct because the upper level pages are
displaying without problem. I am utterly perplexed and any suggestions
would be welcome. I'm using Acess database.
Thank you
Parent paths (using ../../) are enabled by default on IIS5. The default for
IIS6 is that they are not enabled, so this may be the problem if your public
server is windows 2003. If it's your server, you can enable parent paths,
but this is not recommended. If it's not your server, you are unlikely to
persuade your host to enable parent paths. Consequently, you will need to
use a full path in your connection string.
This can be obtained by creating a file called mappath.asp with this
content:
<%Response.Write Server.Mappath("mappath.asp")%>
and placing it in the include folder. Then browse to it.
(www.mydomain/root/_private/include/mappath.asp). It will display the full
path.
--
Mike Brind
supasnail wrote on 02 nov 2006 in
microsoft.public.inetserver.asp.general:
Evertjan. wrote:
>supasnail wrote on 02 nov 2006 in
I have a happily working set of asp pages which read from the
database via include file "./_private/include/database.mdb".
However, when I try to gain access to this database on pages one
folder removed using "../_private/include/database.mdb", the pages
won't display. This whole system works fine on my home test server
(iis.5.0), but 'breaks' when uploaded to the public server. I know
the path to database is correct because the upper level pages are
displaying without problem. I am utterly perplexed and any
suggestions would be welcome. I'm using Acess database.
Use absolute references or server.mapPath() them.
Include files just drop their text content into the calling file, so the current virtual directory is that of the same calling file.
[Please do not toppost on usenet]
I'm not quite sure what you're saying, If I use absolute references on
each page for the database then I would have to change over 30 files
when I upload to the public server after testing, similarly if I use
an absolute path to the include file.
No, not "off" the include file, but address of the database as staed in
the include file cannot be relative to that file, when you plan to call
that file as an include from files in different virtual directories.
So you only change the include file.
[I do not understand what is wrong in correcting 30 files, if you would
have made a mistake in those 30. If you are lazy: editors like Editpadpro
will do that in one move.]
Also I am having trouble
understanding why this entire web site functions correctly on my test
server and not on the public server. It only breaks when i attempt to
call the database from pages one directory removed. Have I
misunderstood the advice?
The whole point of setting up a working site [with serverside code] is
thorough testing and debugging. Perhaps your virtual root directory
[using server.mappath()] is different or whatever. Point is to get it
working.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
I must apologise, I made an error in my forst question, perhaps because
my head is spinning from confusion lol. Where I wrote,
"./_private/include/database.mdb", it should have read
"./_private/include/path.asp" the contents of which is and has always
been the absolute path to the database.
I hope now my previous response makes a little more sense and I
apologise again for creating that confusion.
I have been going round in circles trying to understand this problem,
the site works perfectly on my test server.
S
Evertjan. wrote:
supasnail wrote on 02 nov 2006 in
microsoft.public.inetserver.asp.general:
Evertjan. wrote:
supasnail wrote on 02 nov 2006 in
I have a happily working set of asp pages which read from the
database via include file "./_private/include/database.mdb".
However, when I try to gain access to this database on pages one
folder removed using "../_private/include/database.mdb", the pages
won't display. This whole system works fine on my home test server
(iis.5.0), but 'breaks' when uploaded to the public server. I know
the path to database is correct because the upper level pages are
displaying without problem. I am utterly perplexed and any
suggestions would be welcome. I'm using Acess database.
Use absolute references or server.mapPath() them.
Include files just drop their text content into the calling file,
so the current virtual directory is that of the same calling file.
[Please do not toppost on usenet]
I'm not quite sure what you're saying, If I use absolute references on
each page for the database then I would have to change over 30 files
when I upload to the public server after testing, similarly if I use
an absolute path to the include file.
No, not "off" the include file, but address of the database as staed in
the include file cannot be relative to that file, when you plan to call
that file as an include from files in different virtual directories.
So you only change the include file.
[I do not understand what is wrong in correcting 30 files, if you would
have made a mistake in those 30. If you are lazy: editors like Editpadpro
will do that in one move.]
Also I am having trouble
understanding why this entire web site functions correctly on my test
server and not on the public server. It only breaks when i attempt to
call the database from pages one directory removed. Have I
misunderstood the advice?
The whole point of setting up a working site [with serverside code] is
thorough testing and debugging. Perhaps your virtual root directory
[using server.mappath()] is different or whatever. Point is to get it
working.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
OK, I have found a solution - I am now using 'include virtual' rather
than 'include file' so i dont have to use ../../ for gaining access to
higher directories.
On Nov 2, 10:31 am, "supasnail" <supasn...@gmail.comwrote:
I must apologise, I made an error in my forst question, perhaps because
my head is spinning from confusion lol. Where I wrote,
"./_private/include/database.mdb", it should have read
"./_private/include/path.asp" the contents of which is and has always
been the absolute path to the database.
I hope now my previous response makes a little more sense and I
apologise again for creating that confusion.
I have been going round in circles trying to understand this problem,
the site works perfectly on my test server.
S
Evertjan. wrote:
supasnail wrote on 02 nov 2006 in
microsoft.public.inetserver.asp.general:
Evertjan. wrote:
>supasnail wrote on 02 nov 2006 in
I have a happily working set of asp pages which read from the
database via include file "./_private/include/database.mdb".
However, when I try to gain access to this database on pages one
folder removed using "../_private/include/database.mdb", the pages
won't display. This whole system works fine on my home test server
(iis.5.0), but 'breaks' when uploaded to the public server. I know
the path to database is correct because the upper level pages are
displaying without problem. I am utterly perplexed and any
suggestions would be welcome. I'm using Acess database.
>Use absolute references or server.mapPath() them.
>Include files just drop their text content into the calling file,
>so the current virtual directory is that of the same calling file.
[Please do not toppost on usenet]
I'm not quite sure what you're saying, If I use absolute references on
each page for the database then I would have to change over 30 files
when I upload to the public server after testing, similarly if I use
an absolute path to the include file.
No, not "off" the include file, but address of the database as staed in
the include file cannot be relative to that file, when you plan to call
that file as an include from files in different virtual directories.
So you only change the include file.
[I do not understand what is wrong in correcting 30 files, if you would
have made a mistake in those 30. If you are lazy: editors like Editpadpro
will do that in one move.]
Also I am having trouble
understanding why this entire web site functions correctly on my test
server and not on the public server. It only breaks when i attempt to
call the database from pages one directory removed. Have I
misunderstood the advice?
The whole point of setting up a working site [with serverside code] is
thorough testing and debugging. Perhaps your virtual root directory
[using server.mappath()] is different or whatever. Point is to get it
working.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
supasnail wrote on 02 nov 2006 in microsoft.public.inetserver.asp.general:
OK, I have found a solution - I am now using 'include virtual' rather
than 'include file' so i dont have to use ../../ for gaining access to
higher directories.
Congtrats, but:
[Please do not toppost on usenet]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress) This discussion thread is closed Replies have been disabled for this discussion. Similar topics
6 posts
views
Thread by Graeme Wood |
last post: by
|
3 posts
views
Thread by prodirect |
last post: by
|
2 posts
views
Thread by Brian Cooper |
last post: by
|
2 posts
views
Thread by Jon L. Lovesky |
last post: by
|
2 posts
views
Thread by Charl |
last post: by
|
2 posts
views
Thread by Richard Lionheart |
last post: by
|
1 post
views
Thread by Roger Hembury |
last post: by
|
6 posts
views
Thread by Bob Alston |
last post: by
|
2 posts
views
Thread by =?ISO-8859-1?B?RulybmFz?= |
last post: by
| | | | | | | | | | |