473,395 Members | 1,462 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,395 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 1303
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
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.