hi all,
i've a legacy ASP.NTT code that works fine, but now i'm trying to add new
feature
so i get the files from our source safe and put them in "d:\Projects\mySite"
and created a new virtual directory for it and make it point to the project
Directory
, till now every thing is ok,
the problem is that Server.MapPath("/") returns "c:\inetpub\wwwroot" ???
i dont know why, while it works fine on site
i'm running IIS 5 on win2000 pro
thanks,
with my best regards 5 938
That is expected behavior. / is the root of your site, regardless of where
you are, so when that path is translated to the file system, it is where the
root of your site is. This is C:\Inetpub\wwwroot in a default
configuration.
../ would work for you.
Ray at work
"Ahmed El Lakani" <a@hotmail.com> wrote in message
news:Ol**************@TK2MSFTNGP10.phx.gbl... hi all,
i've a legacy ASP.NTT code that works fine, but now i'm trying to add new feature
so i get the files from our source safe and put them in
"d:\Projects\mySite" and created a new virtual directory for it and make it point to the
project Directory
, till now every thing is ok,
the problem is that Server.MapPath("/") returns "c:\inetpub\wwwroot" ???
i dont know why, while it works fine on site
i'm running IIS 5 on win2000 pro
thanks,
with my best regards
Thanks Ray,
mmmm, but how it was installed on hosting machine ????
is this mean that its installed on the root ????, or some thing that isn't
avilable on win2000 pro
if that, so how i'm going to change it to work on both sides ??? my pc and
the host ?
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:#1**************@TK2MSFTNGP10.phx.gbl... That is expected behavior. / is the root of your site, regardless of
where you are, so when that path is translated to the file system, it is where
the root of your site is. This is C:\Inetpub\wwwroot in a default configuration.
./ would work for you.
Ray at work
"Ahmed El Lakani" <a@hotmail.com> wrote in message news:Ol**************@TK2MSFTNGP10.phx.gbl... hi all,
i've a legacy ASP.NTT code that works fine, but now i'm trying to add
new feature
so i get the files from our source safe and put them in "d:\Projects\mySite" and created a new virtual directory for it and make it point to the
project Directory
, till now every thing is ok,
the problem is that Server.MapPath("/") returns "c:\inetpub\wwwroot" ???
i dont know why, while it works fine on site
i'm running IIS 5 on win2000 pro
thanks,
with my best regards
I don't really understand your questions or what the issue is. Can you
rexplain or explain what's not working for you?
Ray at work
"Ahmed El Lakani" <a@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... Thanks Ray,
mmmm, but how it was installed on hosting machine ???? is this mean that its installed on the root ????, or some thing that isn't avilable on win2000 pro if that, so how i'm going to change it to work on both sides ??? my pc and the host ?
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in message news:#1**************@TK2MSFTNGP10.phx.gbl... That is expected behavior. / is the root of your site, regardless of where you are, so when that path is translated to the file system, it is where the root of your site is. This is C:\Inetpub\wwwroot in a default configuration.
./ would work for you.
Ray at work
"Ahmed El Lakani" <a@hotmail.com> wrote in message news:Ol**************@TK2MSFTNGP10.phx.gbl... hi all,
i've a legacy ASP.NTT code that works fine, but now i'm trying to add new feature
so i get the files from our source safe and put them in "d:\Projects\mySite" and created a new virtual directory for it and make it point to the
project Directory
, till now every thing is ok,
the problem is that Server.MapPath("/") returns "c:\inetpub\wwwroot"
??? i dont know why, while it works fine on site
i'm running IIS 5 on win2000 pro
thanks,
with my best regards
i'm just asking on how to change the call to MapPath
to make it machine independent and also path independent ????
Thanks for your help
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:e8**************@TK2MSFTNGP10.phx.gbl... I don't really understand your questions or what the issue is. Can you rexplain or explain what's not working for you?
Ray at work
"Ahmed El Lakani" <a@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... Thanks Ray,
mmmm, but how it was installed on hosting machine ???? is this mean that its installed on the root ????, or some thing that
isn't avilable on win2000 pro if that, so how i'm going to change it to work on both sides ??? my pc
and the host ?
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in message news:#1**************@TK2MSFTNGP10.phx.gbl... That is expected behavior. / is the root of your site, regardless of where you are, so when that path is translated to the file system, it is
where the root of your site is. This is C:\Inetpub\wwwroot in a default configuration.
./ would work for you.
Ray at work
"Ahmed El Lakani" <a@hotmail.com> wrote in message news:Ol**************@TK2MSFTNGP10.phx.gbl... > hi all, > > i've a legacy ASP.NTT code that works fine, but now i'm trying to
add new > feature > > so i get the files from our source safe and put them in "d:\Projects\mySite" > > and created a new virtual directory for it and make it point to the project > Directory > > , till now every thing is ok, > > the problem is that Server.MapPath("/") returns "c:\inetpub\wwwroot" ??? > > i dont know why, while it works fine on site > > i'm running IIS 5 on win2000 pro > > thanks, > > with my best regards > >
As stated by Ray Server.MapPath ("./") which is the path of the current
directory.
Server.MapPath("/") is the path of the root directory for the site. Your web
application could be anywhere under the root such as
c:\root\external\yourname\yourapp and it can't be machine independant.
Server.MapPath("~/") will give you the root of your application
(c:\root\external\yourname\yourapp) while Server.mapPath("/") will give
c:\root.
Patrice
"Ahmed El Lakani" <a@hotmail.com> a écrit dans le message de
news:%2****************@TK2MSFTNGP09.phx.gbl... i'm just asking on how to change the call to MapPath to make it machine independent and also path independent ????
Thanks for your help
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in message news:e8**************@TK2MSFTNGP10.phx.gbl... I don't really understand your questions or what the issue is. Can you rexplain or explain what's not working for you?
Ray at work
"Ahmed El Lakani" <a@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... Thanks Ray,
mmmm, but how it was installed on hosting machine ???? is this mean that its installed on the root ????, or some thing that isn't avilable on win2000 pro if that, so how i'm going to change it to work on both sides ??? my pc and the host ?
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in message news:#1**************@TK2MSFTNGP10.phx.gbl... > That is expected behavior. / is the root of your site, regardless
of where > you are, so when that path is translated to the file system, it is where the > root of your site is. This is C:\Inetpub\wwwroot in a default > configuration. > > ./ would work for you. > > Ray at work > > "Ahmed El Lakani" <a@hotmail.com> wrote in message > news:Ol**************@TK2MSFTNGP10.phx.gbl... > > hi all, > > > > i've a legacy ASP.NTT code that works fine, but now i'm trying to add new > > feature > > > > so i get the files from our source safe and put them in > "d:\Projects\mySite" > > > > and created a new virtual directory for it and make it point to
the > project > > Directory > > > > , till now every thing is ok, > > > > the problem is that Server.MapPath("/") returns
"c:\inetpub\wwwroot" ??? > > > > i dont know why, while it works fine on site > > > > i'm running IIS 5 on win2000 pro > > > > thanks, > > > > with my best regards > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dan Sikorsky |
last post by:
How do you use server.mappath to update a access database on a completely
different computer? One of my websites needs to update a database on a
completely different website.
Example:
My ASP...
|
by: Ahmed El Lakani |
last post by:
hi all,
i've a legacy ASP.NTT code that works fine, but now i'm trying to add new
feature
so i get the files from our source safe and put them in "d:\Projects\mySite"
and created a new...
|
by: mdurliSPAMFILTER |
last post by:
Hello,
I developed a win32 .exe CGI that connects to a clustered SQLServer to
report some data.
The software is written with Borland C++Builder.
This is the oledb string:...
|
by: Christoph Zwerschke |
last post by:
Just hitting a strange problem with Python import behavior. It is the
same on all Python 2.x versions and it is probably correct, but I
currently don't understand why this happens.
I have...
|
by: JR |
last post by:
My IIS Web site has a virtual directory called content mapped to a network
share. If the home directory of the Web site is c:\inetpub\wwwroot and the
virtual directory maps to the network share...
|
by: Mark Horrocks |
last post by:
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...
|
by: L Scott |
last post by:
Have developed a c# / asp.net web app. Works locally. But over the internet
when I access the site, it eventually returns a 'The page cannot be
displayed' page. Not always on the same page. Can...
|
by: benoit |
last post by:
Hi,
if I write this code to retrieve a folder on the server
Server.mappath("/DATA")
I get this error message
System.InvalidOperationException: Failed to map the path '/DATA'
the virtual...
|
by: Lorenzo |
last post by:
Hello,
I have a web application with a virtual directory in it. With 'virtual
directory' i mean
a folder whose physical path is different from the physical path of the
application, but in which...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |