Get Application Pool Name

S

Serge

How can you get the application pool name that handles the web request?
Currently we display the server name using: <!-- <%= Server.MachineName
%> --> but would like to also display what application pool the page came
from.

Thanks,
Serge
 
J

Juan T. Llibre

Nah, that won't do it.

Here's the way to do it :

http://west-wind.com/WebLog/posts/10181.aspx




Eliyahu Goldin said:
Try Request.ServerVariables["APP_POOL_ID"]

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Serge said:
How can you get the application pool name that handles the web request? Currently we display the
server name using: <!-- <%= Server.MachineName %> --> but would like to also display what
application pool the page came from.

Thanks,
Serge
 
S

Serge

Eliyahu,
Thanks for the suggestion. I tried that on IIS 6.0 and it does not return
anything. LOCAL_ADDR works fine though and returns the IP. I did a trace to
check all the server variables and there is no APP_POOL_ID (while everything
else is there). Any idea why that is missing from the server variables?

Thank you for your help,
Serge

Eliyahu Goldin said:
Try Request.ServerVariables["APP_POOL_ID"]

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Serge said:
How can you get the application pool name that handles the web request?
Currently we display the server name using: <!-- <%= Server.MachineName
%> --> but would like to also display what application pool the page came
from.

Thanks,
Serge
 
E

Eliyahu Goldin

Hmm...It is actually listed here
http://msdn2.microsoft.com/en-us/library/ms524602.aspx

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Serge said:
Eliyahu,
Thanks for the suggestion. I tried that on IIS 6.0 and it does not return
anything. LOCAL_ADDR works fine though and returns the IP. I did a trace
to check all the server variables and there is no APP_POOL_ID (while
everything else is there). Any idea why that is missing from the server
variables?

Thank you for your help,
Serge

Eliyahu Goldin said:
Try Request.ServerVariables["APP_POOL_ID"]

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Serge said:
How can you get the application pool name that handles the web request?
Currently we display the server name using: <!-- <%= Server.MachineName
%> --> but would like to also display what application pool the page
came from.

Thanks,
Serge
 
S

Serge

Yup, I know. :) Trying to figure out why it's not working with IIS 6.0.

Eliyahu Goldin said:
Hmm...It is actually listed here
http://msdn2.microsoft.com/en-us/library/ms524602.aspx

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Serge said:
Eliyahu,
Thanks for the suggestion. I tried that on IIS 6.0 and it does not return
anything. LOCAL_ADDR works fine though and returns the IP. I did a trace
to check all the server variables and there is no APP_POOL_ID (while
everything else is there). Any idea why that is missing from the server
variables?

Thank you for your help,
Serge

Eliyahu Goldin said:
Try Request.ServerVariables["APP_POOL_ID"]

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


How can you get the application pool name that handles the web request?
Currently we display the server name using: <!-- <%=
Server.MachineName %> --> but would like to also display what
application pool the page came from.

Thanks,
Serge
 
J

Juan T. Llibre

It doesn't work for my IIS 6.0, either.
Maybe it's time to file a bug report ?




Serge said:
Yup, I know. :) Trying to figure out why it's not working with IIS 6.0.
Eliyahu Goldin said:
Hmm...It is actually listed here http://msdn2.microsoft.com/en-us/library/ms524602.aspx

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Serge said:
Eliyahu,
Thanks for the suggestion. I tried that on IIS 6.0 and it does not return anything. LOCAL_ADDR
works fine though and returns the IP. I did a trace to check all the server variables and there
is no APP_POOL_ID (while everything else is there). Any idea why that is missing from the server
variables?

Thank you for your help,
Serge

Try Request.ServerVariables["APP_POOL_ID"]

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


How can you get the application pool name that handles the web request? Currently we display
the server name using: <!-- <%= Server.MachineName %> --> but would like to also display what
application pool the page came from.

Thanks,
Serge
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top