question about application root path?

G

Guest

Hi, since I'm developing on XP and can only have on website, how can you
refer to your root application (not web) in your paths?

I read for server controls that "the ~/ prefix will be converted to the
application path as in ASP.NET so that links have the correct path relative
to the web-site root."

However, what do you do about ".css", ".js" links in your html? Dave.
 
J

Juan T. Llibre

You should have a complete directory structure
for each IIS application you are running.

Then, there's no problems setting relative paths.

The idea that you should have a machine-wide file system
is a bit spooky, since many ( most?) times you do *not*
want to mix user A's files with User B's files.

Think of applications as being different users
and you will have no problem getting used to the idea.

For a workaround to the "one website" XP limitation, see
http://dotnetjunkies.com/WebLog/mjordan/archive/2003/12/30/5033.aspx
or
http://h4ck3r.net/ ( titled iis_multiplex )
 
G

Guest

Wont' relative paths not work when you have references to say images in user
controls which in turn are used at different pages or folder levels in your
app?
 
J

Juan T. Llibre

You can set the tree structure so that the
only common directory is the /bin directory.

Everything else can be run from
directories *below* the app directory.

I think that the "one website" rule is stupid, btw.

Whomever thought that one up should
be hung by his you-know-what.

Another workaround would be to not use IIS at all,
but use Cassini, the web server included with Web Matrix.
 
Joined
Aug 28, 2008
Messages
19
Reaction score
0
RE: ROOT APP Path

QVISLib.Utils.Utils.GetURLRootApplicationPath()

One line and you can have it all.

Just google and you find it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top