Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Server.MapPath bug?

Reply
Thread Tools

Server.MapPath bug?

 
 
jamting@gmail.com
Guest
Posts: n/a
 
      01-18-2006
Since i reinstalled windows server, i've had a strange behaviour in
server.mappath.

for instance this file: test.asp:

<%
response.write server.mappath(".") & "<br>"
response.write server.mappath("..")
%>

Returns the following output, when placed in a new root i've set up on
drive d:

D:\inetpub\wwwroot\
D:\inetpub\wwwroot\

If i however place this file i the default site it returns

c:\inetpub\wwwroot
c:\inetpub

Any clues?

 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      01-18-2006
wrote on 18 jan 2006 in microsoft.public.inetserver.asp.general:

> Since i reinstalled windows server, i've had a strange behaviour in
> server.mappath.
>
> for instance this file: test.asp:
>
> <%
> response.write server.mappath(".") & "<br>"
> response.write server.mappath("..")
> %>
>
> Returns the following output, when placed in a new root i've set up on
> drive d:
>
> D:\inetpub\wwwroot\
> D:\inetpub\wwwroot\
>
> If i however place this file i the default site it returns
>
> c:\inetpub\wwwroot
> c:\inetpub
>


You cnnot get below the root, because that is not part of the external
layout.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
 
Jevon
Guest
Posts: n/a
 
      01-18-2006
Is one set up as an application (on the website properties' Home Directory
tab) and the other not?

Jevon


<> wrote in message
news: oups.com...
> Since i reinstalled windows server, i've had a strange behaviour in
> server.mappath.
>
> for instance this file: test.asp:
>
> <%
> response.write server.mappath(".") & "<br>"
> response.write server.mappath("..")
> %>
>
> Returns the following output, when placed in a new root i've set up on
> drive d:
>
> D:\inetpub\wwwroot\
> D:\inetpub\wwwroot\
>
> If i however place this file i the default site it returns
>
> c:\inetpub\wwwroot
> c:\inetpub
>
> Any clues?
>



 
Reply With Quote
 
jamting@gmail.com
Guest
Posts: n/a
 
      01-19-2006
No they´re set up the same, and with parent paths enabled. Initially i
got the error on a server.execute statement, which i found out after
some investigation, was fed the wrong relative path. I then isolated
the error to the two server.mappath statements.

I found two references in google groups with the same error, but the
threads started back in 2002 and was never resolved.

I'm running Windows 2003 server standard with all patches. The only
thing changed from the previous installation is that i now use the
swedesh version rather than the english.

Thanks for your replies and keep them coming

/Mattias

 
Reply With Quote
 
Jevon
Guest
Posts: n/a
 
      01-19-2006
I've just tried it (on an English install) and it works as expected for me.
Have you tried deleting and recreating the folder and website?

Jevon


<> wrote in message
news: ups.com...
No they´re set up the same, and with parent paths enabled. Initially i
got the error on a server.execute statement, which i found out after
some investigation, was fed the wrong relative path. I then isolated
the error to the two server.mappath statements.

I found two references in google groups with the same error, but the
threads started back in 2002 and was never resolved.

I'm running Windows 2003 server standard with all patches. The only
thing changed from the previous installation is that i now use the
swedesh version rather than the english.

Thanks for your replies and keep them coming

/Mattias


 
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




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