473,394 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Application Root

I want to know how I can determin the root of my application in code.

AND

I need to know how I can refer to my application root in HTML as / goes
right back to wwwwroot

Oct 9 '06 #1
5 1065
string physicalRootPath = Server.MapPath("/");

Goofy wrote:
I want to know how I can determin the root of my application in code.

AND

I need to know how I can refer to my application root in HTML as / goes
right back to wwwwroot
Oct 9 '06 #2
Thanks for the tip.
"Chris Fulstow" <ch**********@hotmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
string physicalRootPath = Server.MapPath("/");

Goofy wrote:
>I want to know how I can determin the root of my application in code.

AND

I need to know how I can refer to my application root in HTML as / goes
right back to wwwwroot

Oct 9 '06 #3
That didnt give me what I was asking for actually as this returns

servername/wwwroot

I need the application directory ie servername/myAspNetApplication

Cheers
"Chris Fulstow" <ch**********@hotmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
string physicalRootPath = Server.MapPath("/");

Goofy wrote:
>I want to know how I can determin the root of my application in code.

AND

I need to know how I can refer to my application root in HTML as / goes
right back to wwwwroot

Oct 9 '06 #4
This is actually ~/ instead of /.

--
Patrice

"Goofy" <me@mine.coma écrit dans le message de news:
u%****************@TK2MSFTNGP02.phx.gbl...
That didnt give me what I was asking for actually as this returns

servername/wwwroot

I need the application directory ie servername/myAspNetApplication

Cheers
"Chris Fulstow" <ch**********@hotmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
>string physicalRootPath = Server.MapPath("/");

Goofy wrote:
>>I want to know how I can determin the root of my application in code.

AND

I need to know how I can refer to my application root in HTML as / goes
right back to wwwwroot


Oct 9 '06 #5
Dim host as string = Request.Url.Host
Label1.text = host & Request.ApplicationPath


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Goofy" <me@mine.comwrote in message news:u%****************@TK2MSFTNGP02.phx.gbl...
That didnt give me what I was asking for actually as this returns

servername/wwwroot

I need the application directory ie servername/myAspNetApplication

Cheers
"Chris Fulstow" <ch**********@hotmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
>string physicalRootPath = Server.MapPath("/");

Goofy wrote:
>>I want to know how I can determin the root of my application in code.

AND

I need to know how I can refer to my application root in HTML as / goes
right back to wwwwroot


Oct 9 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tim Jarman | last post by:
Apologies in advance for the long post - I wanted to be sure I included all the relevant details. The answer is probably very, very simple. I am doing something stupid here, but I don't know what...
5
by: Leszek | last post by:
Hello, Could anybody explain what's a difference between a virtual directory and an application root under IIS? I'm a little bit confused. This is mu problem: Let's assume the following...
3
by: Jiong Feng | last post by:
Hi, I have a question. WE have a web application in web root. And also we have a virtual directory library application. If we change root web.config, the root application will restart....
5
by: TomislaW | last post by:
What is asp.net equivalent for Application("Root") in asp?
10
by: Steve Taylor | last post by:
I am having trouble understanding the ASP.NET application boundaries. Here's my setup: 1. Win2003 Server with IIS 6 and an application defined at the root "SalesNow" (www.salesnow.com). 2. A...
5
by: rdcpro | last post by:
In reading MSDN docs on creating custom Configuration sections, I found this page: ...
7
by: Edward Yang | last post by:
In my test, I have two web applications app1 and app2, and I configure them as follows in IIS: $/comboapps |--web.config |--bin | app1.dll | app2.dll |--app1 | form1.aspx
3
by: Carl Johansen | last post by:
I have a big ASP website (used by several thousand car dealers) that is a collection of lots of small and medium-sized applications. Now I want to start adding ASP.NET applications to it. I have...
5
markrawlingson
by: markrawlingson | last post by:
Hey guys, Having a bit of a complicated issue here so please bare with me while I explain. I'm also not a system admin and don't know a whole lot about IIS, so i apologize in advance. I...
5
by: IUnknown | last post by:
Ok, we are all aware of the situation where modifying the folder structure (adding files, folders, deleting files, etc) will result in ASP.NET triggering a recompilation/restart of the application....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.