server.mappath

  • Thread starter Web Search Store
  • Start date
W

Web Search Store

Hello,

I'm trying to use the server.mappath function on a web site hosted on win
2000 professional.

Is this feature not on win 2000 pro?

It simply produces 'page not found'

Thanks for any help

It is in an asp page, with code like this:


countdb="data\searchrequests.txt"
mydsn6= server.mappath(countdb)


Thanks for any help.

Scott Baxter
 
C

Curt_C [MVP]

just for a test, try Server.MapPath("./") and see what DIR it returns....
Most likely you are hitting the wrong path.

That command is there in Win2k's IIS.
 
B

Bob Barrows [MVP]

Web said:
Hello,

I'm trying to use the server.mappath function on a web site hosted on
win 2000 professional.

Is this feature not on win 2000 pro?

It simply produces 'page not found'

Thanks for any help

It is in an asp page, with code like this:


countdb="data\searchrequests.txt"
mydsn6= server.mappath(countdb)
server.mappath returns a physical file path (the path you would use in
Windows Explorer, not IE). It should not be used in a situation where a url
is needed ("page not found" results from an invalid url, not an invalid
physical file path). Why don't you show us how you are attempting to use
mydsn6 - that will probably provide the answer to your question.
 
E

Evertjan.

Web Search Store wrote on 08 okt 2005 in
microsoft.public.inetserver.asp.general:
It is in an asp page, with code like this:


countdb="data\searchrequests.txt"
mydsn6= server.mappath(countdb)

While possible, isn't it a bit strange to set a relative path here,
as you probably don't know the current directory
the ASP executable has "in mind".

Better use an absolute path:

countdb="c:\myDir\data\searchrequests.txt"
mydsn6= server.mappath(countdb)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top