473,400 Members | 2,163 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,400 software developers and data experts.

How to Environment the Assembly is running in

I want to find using code, the environment the dll(Assembly) is runnign from.
suppose i create an Assembly in .NET, then that assembley might be running
under IIS or Webservice or Remoting or windows service or as a part of
standard exe
How can i find where assembly is running from
Oct 2 '05 #1
2 1304
I don't think there is a standard way.

You could, for instance, tell if it running from a website by checking
something like the HttpContext.Current, which will be null if it is not. I
do not think you can determine the difference between a service and console
app as they are both executables.

You can always fake the system by like setting some variable in the OnStart
which will only be set when it is running as a service.

"N S S" <si***@newsgroups.nospam> wrote in message
news:51**********************************@microsof t.com...
I want to find using code, the environment the dll(Assembly) is runnign
from.
suppose i create an Assembly in .NET, then that assembley might be running
under IIS or Webservice or Remoting or windows service or as a part of
standard exe
How can i find where assembly is running from

Oct 2 '05 #2
search these newsgroups for
presser amercer

"N S S" wrote:
I want to find using code, the environment the dll(Assembly) is runnign from.
suppose i create an Assembly in .NET, then that assembley might be running
under IIS or Webservice or Remoting or windows service or as a part of
standard exe
How can i find where assembly is running from

Oct 2 '05 #3

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

Similar topics

0
by: Ken Durden | last post by:
I'm working on a client-server application where the client is controlling two devices (aka servers) which both implement the same interface contract. We have a set of about 4 assemblies which...
13
by: John Bowman | last post by:
Hi All, I've got a simple wrapper static test method on a class to expand the environment variables on a specified string: public static string ExpandEnvironmentStr(string Str) { return...
7
by: JerryW | last post by:
I just reinstalled .NET 2003 (after repeated attempts to get ASP.NET Web Applications to work). I first did a complete uninstall of .NET 2003, .NET Framework 1.1, and IIS. I also completely deleted...
10
by: Edward | last post by:
I've just taken over maintaining a system from a colleague who has left. I find the following line in her code: Dim params(2) As SqlClient.SqlParameter params(0) = New...
2
by: Henry Wu | last post by:
Hi all, I've successfuly compiled, obfuscated and strong named my assembly (typical windows application) and also have verified the assembly if it is valid or not. Upon running it on my development...
2
by: N S S | last post by:
I want to find using code, the environment the dll(Assembly) is runnign from. suppose i create an Assembly in .NET, then that assembley might be running under IIS or Webservice or Remoting or...
2
by: tmoffett | last post by:
I am very new to the language so please pardon my ignorance. I am writing a small console application to gather hardware inventory information. When I run the application locally all works well....
12
by: Steven Berkovitz | last post by:
I have several ASP.NET applications with near identical web.config files. In one of them I am successfuly able to bind to an assembly while on others I am not. All of them have the following...
4
by: Peter Kirk | last post by:
Hi I would like to ask a little bit about the value Environment.Newline: what is it and what is the point of it? Ok, I can see in the docs that it represents "newline" for the current platform -...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.