Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving environmental variables
Message
From
24/03/2003 16:53:25
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Retrieving environmental variables
Miscellaneous
Thread ID:
00769470
Message ID:
00769470
Views:
41
I have code I want to fire when my .aspx page is running on my development web server vs my production web server.

I am trying to read an environmental variable that I have set on my web servers. However, the following returns a blank in a ASP.Net page, but the following works fine in a C# WinForm.

string lcVar = System.Environment.GetEnvironmentVariable("MYVAR");

How can a Asp.Net page read an environmental variable on the web server? Or, is there a better way to determine which web server the web application is running from?

Thanks,

Jerry
Next
Reply
Map
View

Click here to load this message in the networking platform