First, a desktop application can also have a config file that looks the same
as a web.config file, so simply the lack of a web.config does not indicate
that it is not a website. (Your application normally does not care where
the config settings came from -- app.config or web.config -- as long as it
has the same structure.)
You might try checking the HttpContext.Current property. If it is null,
then it is probably not a website.
"suzy" <su**@spam.com> wrote in message
news:Bl*****************@doctor.cableinet.net...
hello,
how do i check from my c# class if it is being called from a asp.net
application or a windows application?
i have some code that reads from the web.config file for webapps, but i
want to default the values to something else if there is no web.config (ie:
windows).
any ideas? thanks.