Am I a Form or ASP.NET app

Am I a Form or ASP.NET app

Post by RGF2aWQgVG » Sun, 15 Apr 2007 12:52:01


Hi;

I have a library that we are going to use in several apps and needs to call
ConfigurationManager when it's a Forms app and WebConfigurationManager when
it's ASP.NET. How can I determine at runtime which it is?

--
thanks - dave
david_at_windward_dot_net
http://www.yqcomputer.com/

Cubicle Wars - http://www.yqcomputer.com/
 
 
 

Am I a Form or ASP.NET app

Post by wawan » Tue, 17 Apr 2007 15:38:51

Hi Dave,

I think you can use HttpContext.Current to determine if it's running in
ASP.NET or not.

Regards,
Walter Wang ( XXXX@XXXXX.COM , remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

 
 
 

Am I a Form or ASP.NET app

Post by RGF2aWQgVG » Thu, 19 Apr 2007 12:02:02

great solution - thanks

--
thanks - dave
david_at_windward_dot_net
http://www.yqcomputer.com/

Cubicle Wars - http://www.yqcomputer.com/