Search:
Namespaces
Discussions
.NET v1.1
Feedback
Server.MapPath()
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngfw' list
.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Mats Cederholm
Hi, all, does anyone know why
Server.MapPath("
http://www.mysite.net/SomeDirectory/SomeFile.aspx"
;)
returns the result:
C:\DirectoriesToInetPub\SomeDirectory\http:\www.mysite.net\SomeDirectory
\SomeFile.aspx?
Is this a bug or am I doing something wrong?
TIA, Mats
/*****************************************************************
Super soakers make great cat behavior-correction devices.
*****************************************************************/
Reply to this message...
Timo Pijnappel
the request may be to enter the physical Server Path.
You must enter the full path to your servers path (eg.
C:\inetpub\mysite\somedirectory\somefile.aspx)
----- Original Message -----
From: "Mats Cederholm" <
Click here to reveal e-mail address
>
To: "aspngfw" <
Click here to reveal e-mail address
>
Sent: Thursday, August 09, 2001 4:00 PM
Subject: [aspngfw] Server.MapPath()
[Original message clipped]
Reply to this message...
Walter Knopf (VIP)
The Server.MapPath doesn't like to have the protocal lumped in
with the address, it just likes an address in web site tree.
Just like in regular asp use:
Server.MapPath("/SomeDirectory/SomeFile.aspx")
assuming SomeDirectory is right below the web root.
Walter
-----Original Message-----
From: Mats Cederholm [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 09, 2001 9:01 AM
To: aspngfw
Subject: [aspngfw] Server.MapPath()
Hi, all, does anyone know why
Server.MapPath("
http://www.mysite.net/SomeDirectory/SomeFile.aspx"
;)
returns the result:
C:\DirectoriesToInetPub\SomeDirectory\http:\www.mysite.net\SomeDirectory
\SomeFile.aspx?
Is this a bug or am I doing something wrong?
TIA, Mats
/*****************************************************************
Super soakers make great cat behavior-correction devices.
*****************************************************************/
| [aspngfw] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngfw.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
Reply to this message...
Scott (VIP)
MapPath expects a relative path, not an absolute path. Try:
Server.MapPath("/SomeDirectory/SomeFile.aspx")
Scott Swigart
-----Original Message-----
From: Mats Cederholm [mailto:
Click here to reveal e-mail address
]=20
Sent: Thursday, August 09, 2001 7:01 AM
To: aspngfw
Subject: [aspngfw] Server.MapPath()
Hi, all, does anyone know why
Server.MapPath("
http://www.mysite.net/SomeDirectory/SomeFile.aspx"
;)
returns the result:
C:\DirectoriesToInetPub\SomeDirectory\http:\www.mysite.net\SomeDirectory
\SomeFile.aspx?
Is this a bug or am I doing something wrong?
TIA, Mats
/*****************************************************************
Super soakers make great cat behavior-correction devices.=20
*****************************************************************/
| [aspngfw] member
Click here to reveal e-mail address
=3D YOUR ID=20
|
http://www.asplists.com/asplists/aspngfw.asp
=3D JOIN/QUIT=20
|
http://www.asplists.com/search
=3D SEARCH Archives
Reply to this message...
Dave Foderick
Follow up question:
Is there any option to have it return the slash (/) by default instead of
the backslash (\) (so I don't have to run it through the replace function)?
Dave
Click here to reveal e-mail address
www.southbeachsoftware.com
-----Original Message-----
From: Scott [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 09, 2001 5:23 PM
To: aspngfw
Subject: [aspngfw] RE: Server.MapPath()
MapPath expects a relative path, not an absolute path. Try:
Server.MapPath("/SomeDirectory/SomeFile.aspx")
Scott Swigart
-----Original Message-----
From: Mats Cederholm [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 09, 2001 7:01 AM
To: aspngfw
Subject: [aspngfw] Server.MapPath()
Hi, all, does anyone know why
Server.MapPath("
http://www.mysite.net/SomeDirectory/SomeFile.aspx"
;)
returns the result:
C:\DirectoriesToInetPub\SomeDirectory\http:\www.mysite.net\SomeDirectory
\SomeFile.aspx?
Is this a bug or am I doing something wrong?
TIA, Mats
/*****************************************************************
Super soakers make great cat behavior-correction devices.
*****************************************************************/
| [aspngfw] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngfw.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
| [aspngfw] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngfw.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Reply to this message...
Steven A Smith (VIP)
No.
----- Original Message -----
From: "Dave Foderick" <
Click here to reveal e-mail address
>
To: "aspngfw" <
Click here to reveal e-mail address
>
Sent: Thursday, August 09, 2001 4:09 PM
Subject: [aspngfw] RE: Server.MapPath()
[Original message clipped]
Reply to this message...
Mats Cederholm
Yes, of course, I don't know what I was thinking :)
/Mats
/*****************************************************************
What does a dyslectic, agnostic insomniac do?
He lies awake most of the night wondering if there is a dog.=20
*****************************************************************/
[Original message clipped]
Reply to this message...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com