This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Webmaster forum > May 2005 > How Do I Create an ASP "Root"?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How Do I Create an ASP "Root"?
TC

2005-05-27, 4:31 am

I'm confused about one aspect of ASP:

When the web server feeds out an ASP page, it first runs the code found
in global.asa. I have several instances of global.asa. How does the
server choose one? My research so far has told me that it runs the
global.asa in "the root folder of the web", but what does that mean?
What is the root folder of the web? From my experimentation, it does
not seem to be the root folder of any website defined in IIS, and it
does not seem to be the root folder of the subweb defined with the
Front Page server extensions. So what is the "root folder"?


-Todd

Steve Sobol

2005-05-27, 4:31 am

TC wrote:
> I'm confused about one aspect of ASP:
>
> When the web server feeds out an ASP page, it first runs the code found
> in global.asa. I have several instances of global.asa. How does the
> server choose one? My research so far has told me that it runs the
> global.asa in "the root folder of the web", but what does that mean?
> What is the root folder of the web?


The top directory of the web.

If your website blahfoo.com is in c:\websites\blah, c:\websites\blah is
the root directory. And for example,
http://blahfoo.com/dir1/dir2/blah.htm is served out of
c:\websites\blah\dir1\dir2\blah.htm -- there are exceptions, but they
all require you to configure IIS in a non standard way.

> not seem to be the root folder of any website defined in IIS, and it
> does not seem to be the root folder of the subweb defined with the
> Front Page server extensions. So what is the "root folder"?


I don't know if you can *have* a global.asa in the root of a subweb.
I've only placed them in the root of the main website - I generally
don't do subwebs on my IIS-hosted projects.

--
JustThe.net - Apple Valley, CA - http://JustThe.net/ - 888.480.4NET (4638)
Steven J. Sobol, Geek In Charge / sjsobol@JustThe.net / PGP: 0xE3AE35ED

"The wisdom of a fool won't set you free"
--New Order, "Bizarre Love Triangle"
dp

2005-05-27, 4:31 am

Steve Sobol wrote:
> TC wrote:
>
> The top directory of the web.
>
> If your website blahfoo.com is in c:\websites\blah, c:\websites\blah
> is the root directory. And for example,
> http://blahfoo.com/dir1/dir2/blah.htm is served out of
> c:\websites\blah\dir1\dir2\blah.htm -- there are exceptions, but they
> all require you to configure IIS in a non standard way.
>
>
> I don't know if you can *have* a global.asa in the root of a subweb.
> I've only placed them in the root of the main website - I generally
> don't do subwebs on my IIS-hosted projects.
>
> --
> JustThe.net - Apple Valley, CA - http://JustThe.net/ - 888.480.4NET
> (4638) Steven J. Sobol, Geek In Charge / sjsobol@JustThe.net / PGP:
> 0xE3AE35ED
> "The wisdom of a fool won't set you free"
> --New Order, "Bizarre Love Triangle"


Been awhile but IIRC, the root of an IIS web is the directory marked as the
"web application" for the domain. Sub domains are also typically located in
directories marked as web apps.
global.asa files go into the web app directory and their scope includes all
sub dirctories under it.

Sub directories (directories under a domain/sub domain) can also be marked
as web apps (by the server admin) and are often done so for domains that
contain more than one .net application.

FP sub webs however are FP constructs - usually just a sub directory that is
not marked as a web app. Their only real usefulness seems to be limiting the
scope of the horrid FP search bot. You can however, make a sub domain a sub
web on some hosts which would enable it to have it's own global.asa.

--
dp


TC

2005-05-27, 7:33 pm

Steve,

Thank you for the reply. Unfortunately, however, I'm having a hard time
reconciling what you say with the behavior of my web server. My website
is in C:\Inetpub\wwwroot (i.e. that that is the home directory for the
default website defined in IIS, and that is the folder mapped to
http://###.###.###.###).

Nevertheless, when I run an ASP page in C:\Inetpub\wwwroot\felix, the
server processes C:\Inetpub\wwwroot\felix\global.asa. In other words,
the server seems to think that C:\Inetpub\wwwroot\felix is the root
folder of an ASP application. Why?

Likewise, when I run an ASP page in C:\Inetpub\wwwroot\work\work_a, the
server does not process C:\Inetpub\wwwroot\work\work_a\global.asa. In
other words, the server does not recognize
C:\Inetpub\wwwroot\work\work_a as the root folder of an ASP
application. Why not?

Neither of these folders is the home directory of a website defined in
IIS. Why is one the root folder of an ASP app, and the other is not?

-Todd

TC

2005-05-27, 7:33 pm

DP,

Unfortunately, I am the server administrator. I'm learning as I go. My
goal is to set up multiple ASP applications.

The terminology "web application" is foreign to me. I know how to use
IIS to set up multiple "Web Sites" on my server, but those web sites do
not seem to correlate to the ASP applications recognized by the server.
Can you give me more detail on the concept of a "web application" and
tell me how to configure one?


-Todd

William Tasso

2005-05-27, 7:33 pm

From the relative comfort of the http://groups.google.com boardroom,
<golemdanube@yahoo.com> patched in a new connection to
news:alt.www.webmaster and said:


> ...
> Nevertheless, when I run an ASP page in C:\Inetpub\wwwroot\felix, the
> server processes C:\Inetpub\wwwroot\felix\global.asa. In other words,
> the server seems to think that C:\Inetpub\wwwroot\felix is the root
> folder of an ASP application. Why?
>
> Likewise, when I run an ASP page in C:\Inetpub\wwwroot\work\work_a, the
> server does not process C:\Inetpub\wwwroot\work\work_a\global.asa. In
> other words, the server does not recognize
> C:\Inetpub\wwwroot\work\work_a as the root folder of an ASP
> application. Why not?
>
> Neither of these folders is the home directory of a website defined in
> IIS. Why is one the root folder of an ASP app, and the other is not?


Do you have the IIS MMC snap-in installed and working?

Take a look at the 'home directory' tab of both sites/[virtual]directories
side by side, particularly the bit that says 'application name'.

--
Whatever you do - do something.
TC

2005-05-27, 7:33 pm

William,

I can use MMC to see the IIS Manager. The IIS Manager gives me a list
of "Web Sites". Neither of the folders I mentioned above
(C:\Inetpub\wwwroot\felix and C:\Inetpub\wwwroot\work\work_a) is the
home directory of a web site. From this, I have concluded that "Web
Site" and "ASP Application" are different things.

You also mentioned virtual directories. I don't know what those are.
How can I find virtual directories in IIS?

I should mention that I'm using Windows Server 2003 and IIS 6.0.


-Todd

William Tasso

2005-05-27, 7:34 pm

From the relative comfort of the http://groups.google.com boardroom,
<golemdanube@yahoo.com> patched in a new connection to
news:alt.www.webmaster and said:


> ...
> I can use MMC to see the IIS Manager. The IIS Manager gives me a list
> of "Web Sites". Neither of the folders I mentioned above
> (C:\Inetpub\wwwroot\felix and C:\Inetpub\wwwroot\work\work_a) is the
> home directory of a web site. From this, I have concluded that "Web
> Site" and "ASP Application" are different things.


ok - open the IIS MMC, click the little '+' next to the site you wish to
look at. You can right-click any of the displayed elements and select
'properties' from the context sensitive menu.


> You also mentioned virtual directories. I don't know what those are.
> How can I find virtual directories in IIS?


They are (more or less) directories that are mapped to IIS but not
phyically under the site root (on disk).

for example you may have a really funky .asp page (or collection of pages)
that is just sooo coool you must have it on every site. So you create
(right click and see what I mean) a virtual directory (under the site)
that points to your on-disk location. Means you can have one code base
serving many sites.

> I should mention that I'm using Windows Server 2003 and IIS 6.0.


quite right too ;)


--
Whatever you do - do something.
TC

2005-05-27, 7:34 pm

William,

That was it!

I'm not using virtual directories, but the properties dialog you
described allows me to designate folders as the root of ASP
applications. This key bit of information was the last thing I needed,
and my website is now working correctly. Thanks.


-Todd

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews