re:
I tried Request.ServerVariables["SCRIPT_NAME"]
and it gives me the name of the script (asmx file)
That's what you requested ( "the web pages name" ).
re:
I tried Request.ServerVariables["SERVER_NAME"]
and it gives me 127.0.0.1
If you're running as localhost, of course it will give you that.
The domain name is only returned if a domain actually exists.
re:
I want this so that if I make 2 identical web sites for 2 different web
pages I can name them different things and name my performance
counters accordingly.
Is there an object I can use to get the Web site description for the
web site that is running?
You might be able to use Request.ServerVariables["APPL_MD_PATH"]
That will return something like :
/LM/W3SVC/1/Root/VirtualDirectory
You can use that to assign a performance counter for that website.
Thank you for the information.
The one thing I can't find in any of those places (I tried all the
above mentioned items) is the web site description. I actually want
the desctiption field under Web site identification on the properties
page of the web site in IIS.
I want this so that if I make 2 identical web sites for 2 different web
pages I can name them different things and name my performance counters
accordingly. The port alone won't be enough though because it is not
displayed in the folder view of IIS.
I tried Request.ServerVariables["SCRIPT_NAME"] and it gives me he
name of the script (asmx file)
I tried Request.ServerVariables["SERVER_NAME"] and it gives me
127.0.0.1
Request.ServerVariables["SERVER_PORT"] does give me the port though,
thanks for that one.
Is there an object I can use to get the Web site description for the
web site that is running?
Thanks, Mike