How would it be possible for an ASP.NET Web application, in it's
Application_Sta rt event procedure, to programmaticall y determine the Web
site (in IIS) that the Web app is running under/for.
Say for example, that I have a Web site defined in IIS, with the
"Applicatio n name" property set to the value "MyWebApp". How could I get
the value "MyWebApp" into a string variable in Application_Sta rt of the
ASP.NET Web application?
Please note that I'd like to get this value directly from IIS, and not have
to manually duplicate it in Web.config.
I'm currently using ASP.NET 3.5 with IIS 5.1 and 6, but will soon be
migratign everything to IIS 7.
Thanks.
Application_Sta rt event procedure, to programmaticall y determine the Web
site (in IIS) that the Web app is running under/for.
Say for example, that I have a Web site defined in IIS, with the
"Applicatio n name" property set to the value "MyWebApp". How could I get
the value "MyWebApp" into a string variable in Application_Sta rt of the
ASP.NET Web application?
Please note that I'd like to get this value directly from IIS, and not have
to manually duplicate it in Web.config.
I'm currently using ASP.NET 3.5 with IIS 5.1 and 6, but will soon be
migratign everything to IIS 7.
Thanks.
Comment