473,383 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to figure out the application context?

Hi everyone,

I'm writing a class library and I need to the know the of the current
application, if it is a web application or a windows application or a
console application. (Actually the latter two doesn't matter)

Checking if HttpContext.Current doesn't seem like the right way. I
think there must be some properties in the AppDomain or somewhere else
but I couldn't find.

/tb.

Jul 14 '06 #1
3 2047
What's wrong with HttpContex?
Hi everyone,

I'm writing a class library and I need to the know the of the current
application, if it is a web application or a windows application or a
console application. (Actually the latter two doesn't matter)

Checking if HttpContext.Current doesn't seem like the right way. I
think there must be some properties in the AppDomain or somewhere else
but I couldn't find.
--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Jul 14 '06 #2

Michael Nemtsev wrote:
What's wrong with HttpContex?
I think a property in AppDomain or an environment variable tastes
better. I'm already checking HttpContext right now. I wondered if there
is another way..
>
Hi everyone,

I'm writing a class library and I need to the know the of the current
application, if it is a web application or a windows application or a
console application. (Actually the latter two doesn't matter)

Checking if HttpContext.Current doesn't seem like the right way. I
think there must be some properties in the AppDomain or somewhere else
but I couldn't find.

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Jul 14 '06 #3
Hi,

"Tuncay Baskan" <tb*****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
>
Michael Nemtsev wrote:
>What's wrong with HttpContex?

I think a property in AppDomain or an environment variable tastes
better. I'm already checking HttpContext right now. I wondered if there
is another way..
Not that I know of, especially if what really interest you is knowing if you
are in a web environment or in something else.

I will stuck with HttpContext.

--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Jul 14 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sivashankaran Vaidhyalingam | last post by:
Hi folks, I have an aspx application App A hosted in a server which is inside the intranet . I need to serve pages from this application _through_ another application App B which acts as a proxy...
2
by: Uchiha Jax | last post by:
Hi, Recently had an issue with the Audio object from Microsoft.DirectX.AudioVideoPlayback. None of the events were firing from the object during tests (NUnit or Console). Knowing I had it...
0
by: Brett | last post by:
I am working with vb.net in a asp.net application. I have created a config file in xml format. The goal is to be able to change the config file without having to recompile the entire...
4
by: Hari Koduru | last post by:
Hi All, I am getting the following exception in an ASP.NET application. Exception Details: System.InvalidOperationException: Application is restarting. I have been to the following Support...
5
by: Martin Robins | last post by:
I have never dabbled with ASP.NET until now so be warned! I have created a web application with the single default form: WebForm1.aspx and when I try to display it I get this error. My...
0
by: pamelafluente | last post by:
I have implemented an example of HttpHandler to talk with my Windows application running on the server. I want to send some command (to do something) from IE (client) to my program running on...
4
by: Karl | last post by:
Hi all, I want to write an application that is launched from the context menu in Windows Explorer/Computer. That is to say, when I am browsing around my hard drive and get to any location I...
4
by: Andrus | last post by:
For winforms application with multiple related forms it is reasonable to create Linq database context object in start of application. Context object is released only when application exits. So...
0
by: Steve | last post by:
Hello- Your assistance with this issue is greatly appreciated. Environment: - Load-balanced IIS 6.0 servers (Win2003) - web servers point (via UNC path) to a Microsoft File Cluster on...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.