Get Application Pool Name

  • Thread starter Thread starter Serge
  • Start date Start date
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
 
Nah, that won't do it.

Here's the way to do it :

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



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/
===================================
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
 
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
 
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
 
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
 
It doesn't work for my IIS 6.0, either.
Maybe it's time to file a bug report ?



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/
===================================
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
 
Back
Top