Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP / ASP.Net server.mappath

Reply
Thread Tools

ASP / ASP.Net server.mappath

 
 
Mark Horrocks
Guest
Posts: n/a
 
      09-01-2004
Hi,
Whilst trying to solve another problem (see my post yesterday please!)
I have come across something strange.
I created an ASP version and an ASPX version of the same code, and ran
it in the same folder, ie:
http://x.y.z/code/test.asp and http://x.y.z/code/test.aspx
I use code in front as i can't get code behind working on my server
(see previous post please!)

The script simply uses server.mappath to output paths:
server.mappath(".")
server.mappath("..")
server.mappath("/")

the aspx version gives :
current path \\share\folder\code (code is in a virtual defined on a
share)
parent path c:\inetpub\wwwroot
root path c:\inetpub\wwwroot\

the asp version gives
current \\filespace2\intranet\system\code
parent \\filespace2\intranet\system
root c:\inetpub\wwwroot

Note that the path returned for the parent differs significantly.

Is this known behaviour?

Thanks

Mark
 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      09-01-2004
> Is this known behaviour?

Unless you don't know about it, yes.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mark Horrocks" <> wrote in message
news: om...
> Hi,
> Whilst trying to solve another problem (see my post yesterday please!)
> I have come across something strange.
> I created an ASP version and an ASPX version of the same code, and ran
> it in the same folder, ie:
> http://x.y.z/code/test.asp and http://x.y.z/code/test.aspx
> I use code in front as i can't get code behind working on my server
> (see previous post please!)
>
> The script simply uses server.mappath to output paths:
> server.mappath(".")
> server.mappath("..")
> server.mappath("/")
>
> the aspx version gives :
> current path \\share\folder\code (code is in a virtual defined on a
> share)
> parent path c:\inetpub\wwwroot
> root path c:\inetpub\wwwroot\
>
> the asp version gives
> current \\filespace2\intranet\system\code
> parent \\filespace2\intranet\system
> root c:\inetpub\wwwroot
>
> Note that the path returned for the parent differs significantly.
>
> Is this known behaviour?
>
> Thanks
>
> Mark



 
Reply With Quote
 
 
 
 
Mark
Guest
Posts: n/a
 
      09-01-2004
Hi Kevin,
Thanks for your reply. Could you send me a reference to where this is
described, because I can't find anything on MSDN.
Mark





*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      09-01-2004
Well, you just described it. Other than that, I suppose I (or you) would
have to search for it on the Internet. However, as it is something we
already know, I don't see any point in MY searching for it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mark" <> wrote in message
news:ec$...
> Hi Kevin,
> Thanks for your reply. Could you send me a reference to where this is
> described, because I can't find anything on MSDN.
> Mark
>
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      09-01-2004
Let me clarify my response, Mark: You discovered that ASP and ASP.Net return
2 different FORMATS of the same path. Regardless of the format, both are
valid file paths. As far as I'm concerned, it is a somewhat interesting, but
unimportant fact, as both work. My guess would be that Microsoft decided
that a UNC was a more "ubiquitous" way of returning the path, and modified
ASP.Net accordingly. If and where that is documented is unimportant to me,
as you have already told me about it, and therefore, it is already
documented in this newsgroup, and we both already know it. I only look stuff
up that I don't already know.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mark" <> wrote in message
news:ec$...
> Hi Kevin,
> Thanks for your reply. Could you send me a reference to where this is
> described, because I can't find anything on MSDN.
> Mark
>
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
global filter to redirect asp (old asp!) pages on asp.net site Daves ASP .Net 2 05-31-2006 08:33 AM
2.0: asp:Menu, asp:XmlDataSource, asp:PlaceHolder R.A.M. ASP .Net 1 03-29-2006 07:55 AM
[ASP.NET1.1]Should I kill the ASP.NET worker process after recompilingmy ASP.NET webservice? Andrea Raimondi ASP .Net 1 02-06-2006 08:10 AM
ASP.Net cookie -> ASP -> ASP.Net Ben ASP .Net 3 05-28-2004 03:35 PM
LOOP through an ASP form's pages (not ASP.NET - ASP classic) David A. Beck ASP General 10 04-13-2004 05:38 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57