What are the exact reasons that the creation of an appdomain is so expensive. They share the same heap, the same assemblies etc. What exactly needs to be done by the CLR that comsumes so much resources?
We have seen scenarios where accessing a type/instance from the other appdomain takes up 10 seconds (update: all required assemblies th...
Hi,
I know that once a .NET application is launched, 3 Application Domains are created automatically by the CLR, they are System Domain, Shared Domain and Default Domain.
System Domain:
Create the Shared & Default domains
Provide the funcitons of loading and unloading application domains
Load mscorlib.dll into Shared domain
Bookkeepi...
Hi,
When I make some P/Invoke or COM InterOP, I often bump into the IntPtr. So here is a couple of questions:
Everyone said that IntPtr is a struct, so what's in it? I can only think of an 32bit/64bit integer which is the address it points to. Anything else?
Where is the IntPtr located? If it is a struct, I believe it should be in the...
Due to the huge resources behind it, Javascript seems to rapidly becoming the scripting language of choice for applications, particularly those with a web front end. I have an application that requires extensibility both on the front and backend. Javascript, or a thin wrapper like CoffeeScript, seems like an excellent, future-oriented, ...
I have wondered for a while about the feasibility of having Java run on the CLR.
After seeing a previous question here, I realize that there are quite a few differences between the Sun Java platform and the .NET runtime that would make cross-compiling impossible in all but the most trivial cases.
That being said, isn't IL a Turing-comp...
I wan't to implement the following code - the check if the pointer is null or not null. If the pointer points to object, then do sth with that object, if not - skip that code block.
My code:
ref class EchoClient {
private:
GameMatrix^ gameMatrix;
public:
EchoClient(void);
EchoClient(GameMatrix^);
void do();
};
EchoClie...
Our application is built with VS 2008, uses Linq and has Target Framework set to .NET Framework3.5.
It works OK when only .NET 3.5 or 4 is installed on the machine.
However, on machines where both .NET 2 (or 3.0) and .NET 4 are installed, the application is loaded with .NET 2, and crashes when Linq is accessed, as it looks for the .NET...
I have just read about this article about Code Access Security. It has such an example in it:
using System.Security.Permissions;
public class MyFileAccessor
{
public MyFileAccessor(String path, bool readOnly)
{
path = MakeFullPath(path); // helper fcn
FileIOPermissionAccess desiredAccess = readOnly
? FileIOPermissionA...
Hi,
Is it possible to change the value of a public property (type string) of a class within a given .NET AppDomain from another separate .NET AppDomain assuming both AppDomain's are running in the same process. The other important assumption is that the code running in the AppDomain that contains the property can not be modified .. ie ...
At my work, we are developing different applications using .net framework 4. All the applications use common assemblies that we developed, for example the data layer in data.dll. These applications reside on a network drive and are launched directly from there.
Most big applications take a while, like maybe 4-5 seconds, to launch the fi...
Hi,
I am encountering some issues with one project. I need to use two libraries but one needs to be compiled with the /clr switch as the other cannot be compiled with this switch.
Would there be a way to use at the same time those two libraries in one project? Currently it's compiled with /clr and I got linking errors with the noclr li...
Hi All,
I want to know how do I exactly call a function from ProjectA::ClassA::FuncA() that is a Win32 .lib with /clr from a ProjectB::ClassB::FuncB() that does not have clr support and is a pure Win32 project.
Both these projects are under same solution.
First, this is what I have tried:
1. Created the ProjectA with the .lib
2. Added t...
While I have seen some discussions on the utilization of an older CLR 2.0 component within a newer CLR 4.0 application, how would one handle the opposite case?
For example, if one had a legacy app in .Net 2.0, and wanted to take advantage of a newer business logic that took full advantage of the 4.0 version of the CLR, how would one go ...
If I create a new thread on an ASP.NET page the IsThreadPoolThread property is true.
First question is, is it from ASP.NET pool or CLR pool ?
Second question is, if it is from ASP.NET pool then how to create a thread from CLR and don't use ASP.NET pool ?
I need a synchronous solution for long-running requests (full story).
...
I'm really frustrated with this one. I'm trying to extend a C# created interface in C++/CLR. The interface has one method and I've declared it in my class, but the compiler keeps telling me that I must still provide an implementation for the interface method. What more can I do? What am I missing!?
Does anyone have any examples of h...
I need to obtain some information from the users in the database that is stored on Active Directory, I've a simple function to do this:
using (DirectoryEntry de = new DirectoryEntry("LDAP://ANYGIVENDOMAIN"))
{
using (DirectorySearcher adSearch = new DirectorySearcher(de))
{
adSearch.Filter = "(sAMAccountName=jdoe)"; ...
In my AppDomain there are few dynamic assembly, when I try
codeDom.CompileAssemblyFromSource
to Compile another new assembly, I can't figure out a way to add those dynamic assemble to ReferencedAssemblies.
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
{
compilerParameters.ReferencedAssemblies.Add(assembly.L...
i'm trying to decipher the meaning on the P1...P10 parameters associated with a clr20r3 that is written to the event log when my application experiences an exception.
The best i've been able to find is:
P1: the hosting process (e.g. w3wp.exe)
P2: the hosting process version (e.g. 6.0.3790.1830)
P3: ??? (e.g. 42435be1)
P4: the assembly...
I see this in the book "CLR via C#" and I don't catch it. If there are still threads available in the thread pool, why does it create additional threads?
...