<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx</link><description>An AppDomain is a light-weight process. Well, if you actually measure the costs associated with an AppDomain – especially the first one you create, which has some additional costs that are amortized over all subsequent ones – then “light-weight” deserves</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>RE: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#51467</link><pubDate>Mon, 02 Jun 2003 08:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51467</guid><dc:creator>Ricky Datta</dc:creator><description>Asynchronous I/O
-----------------------------

Can you please talk about how .NET framework takes advantage of I/O completion port  [or not ] mechanism on
Windows ?

I am specially interested in high capacity server implementations. In particular, I want to know about equivalent
Win32 mechanisms for AcceptEx, ConnectEx and TransmitPackets (with TF_REUSE flags).

Also, How come DACLs and security tokens are not modelled in the .NET framework ?

Thanks
Ricky</description></item><item><title>RE: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#51468</link><pubDate>Mon, 02 Jun 2003 18:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51468</guid><dc:creator>John Lewicki</dc:creator><description>Could you maybe clarify what you mean by Marshal-By-Bleed?  I suspect the meaning is supposed to be self-evident by the use of the word bleed, but there was a conspicuous lack of cartoon light bulbs above my head when I read that paragraph...

By the way, its not possible for the blog to be too long when then posts have such fabulous technical content and clarity...

</description></item><item><title>RE: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#51469</link><pubDate>Mon, 02 Jun 2003 19:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51469</guid><dc:creator>Chris Brumme</dc:creator><description>The use of the word &amp;quot;bleed&amp;quot; is supposed to imply that the objects bleed across the AppDomain boundary, rather than being properly contained inside the AppDomain they were created in.  This is similar to the way colors might bleed from one garment to another in the laundry, though I don't have much direct experience with washing clothes.

The effect is that you can have direct references to the same object instance in many AppDomains simultaneously.</description></item><item><title>RE: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#51470</link><pubDate>Wed, 04 Jun 2003 19:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51470</guid><dc:creator>Chris Brumme</dc:creator><description>Ricky,

The DACLs and security tokens are not yet modeled in the .NET framework, only because we didn't get around to it yet.  I'm sure you will see support for them at some point.

As for IOCompletionPort support, have a look at ThreadPool.BindHandle which allows you to associate a handle (like a file handle) with the IOCompletion port that the ThreadPool controls.  Also have a look at the System.Threading.Overlapped class, which allows you to receive callbacks via that IOCompletionPort, for any overlapped operations against that handle.

I think you are asking whether the FX classes for e.g. Sockets are using this mechanism.  That's a better question for the authors of the appropriate FX classes.  (I suspect they are using this mechanism).</description></item><item><title>RE: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#51471</link><pubDate>Mon, 09 Jun 2003 18:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51471</guid><dc:creator>pedronis</dc:creator><description>Having a kind of in-memory created (dynamic) assemblies that are implicitly  &amp;quot;unloaded&amp;quot; when they and their types  are no longer reacheable would be a nice feature.  Many dynamic languages impl. over the JVM depends on class unloading through GC  (there is based on classloaders/their classes unreachability).  I think , because of type identity rules and only-once guarantees for static initializers, this can be done only for some kind of only  in-memory created assemblies.
At the moment in-memory created assemblies are not GCed  indipendently of  the AppDomain.

right? e.g.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcondetailsofregularexpressionbehavior.asp

regards.</description></item><item><title>RE: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#51472</link><pubDate>Mon, 16 Jun 2003 08:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51472</guid><dc:creator>Cosmo</dc:creator><description>These weblogs are among the very few that I've found that are actually worth reading. Thanks, Chris. Keep up the great work (and plug those Framework holes!)

Cosmo</description></item><item><title>RE: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#51473</link><pubDate>Mon, 23 Jun 2003 19:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51473</guid><dc:creator>Chris Brumme</dc:creator><description>Pedronis,

Everyone asks us for automatic implicit unloading of assemblies based on reachability.  It's a feature that is extremely popular, but very expensive for us to build.  The decision of when/if to deliver this feature is more of a scheduling exercise.  Other features keep getting in the way.</description></item><item><title>RE: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#51474</link><pubDate>Tue, 22 Jul 2003 00:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51474</guid><dc:creator>Matt Fausey</dc:creator><description>Chris,

I've been plagued with an &amp;quot;Attempted to access an unloaded AppDomain&amp;quot; for several months now.  We have a .NET Email Component such that for some ASP.NET customers that user our DLL will get this error occasionally.  Our DLL is strongly named, so I am confused as to how this could be happening.  It is a mixed-mode DLL implemented in managed C++ such that a thin managed C++ wrapper surrounds the unmanaged C++ implementation.  I've gone over every piece of documentation and information on the Net that I can find about creating managed wrappers around unmanaged types, and as far as I can see I am doing everything correctly.  To give  you a flavor of what happens, here is an example snippet of a customer's code:

               Chilkat.Email email = new Chilkat.Email();
               email.From = FromAddress;
               email.AddTo(&amp;quot;&amp;quot;, Address);
               email.Subject = Subject;
               email.Body = Body;


The exception occurs when I set a value to the Body.  The other statements execute without issue.  Also, when I dump &amp;quot;email&amp;quot; in the Command Window, I get this:


{Chilkat.Email}
   System.Object: {Chilkat.Email}
   Body: &amp;lt;error: an exception of type: {System.AppDomainUnloadedException} occurred&amp;gt;
   Decrypted: false
   EmailDate: {7/9/2003}
   EncryptedBy: &amp;quot;&amp;quot;
   FileDistList: &amp;quot;&amp;quot;
   From: &amp;quot;&amp;quot;
   FromAddress: &amp;quot;&amp;quot;
   FromName: &amp;quot;&amp;quot;
   HtmlCharset: &amp;quot;us-ascii&amp;quot;
   LastError: &amp;quot;&amp;quot;
   LocalDate: {7/9/2003}
   m_email: 84812680
   Mailer: &amp;quot;Chilkat Software Inc (http://www.chilkatsoft.com)&amp;quot;
   NumAlternatives: 0
   NumAttachedMessages: 0
   NumAttachments: 0
   NumBcc: 0
   NumCC: 0
   NumRelatedItems: 0
   NumReplacePatterns: 0
   NumTo: 0
   OutlookDistList: &amp;quot;&amp;quot;
   PlainTextCharset: &amp;quot;us-ascii&amp;quot;
   RawHeader: &amp;quot;MIME-Version: 1.0\r\nDate: Wed, 09 Jul 2003 10:55:07 -0400\r\nMessage-ID: &amp;lt;CHILKAT-MID-b18bc301-2589-4599-be87-d83d647ca053@blah&amp;gt;\r\nContent-Type: text/plain; charset=\&amp;quot;us-ascii\&amp;quot;\r\nContent-Transfer-Encoding: 7bit\r\nX-Mailer: Chilkat Software Inc (http://www.chilkatsoft.com)\r\nX-Priority: 3 (Normal)&amp;quot;
   ReceivedEncrypted: false
   ReceivedSigned: false
   ReplyTo: &amp;quot;&amp;quot;
   ReturnReceipt: false
   SendEncrypted: false
   SendSigned: false
   SignaturesValid: false
   SignedBy: &amp;quot;&amp;quot;
   Size: &amp;lt;error: an exception of type: {System.AppDomainUnloadedException} occurred&amp;gt;
   Subject: &amp;quot;&amp;quot;
   Uidl: &amp;quot;&amp;quot;


Note that Size and Body both return exceptions.  Can you think of anything that could possibly cause this?  Any help would be much appreciated.

Best Regards,
Matt Fausey
Chilkat Software, Inc.
</description></item><item><title>RE: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#51475</link><pubDate>Sat, 26 Jul 2003 05:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51475</guid><dc:creator>Chris Brumme</dc:creator><description>Matt,

Feel free to contact me directly on this matter (if you can decode the mangling of my Microsoft email alias!).  My first question is whether you built this for V1 or V1.1 of the CLR.  If you built it for V1 and you are using MC++ with ASP.NET, then there's a high likelihood that I know the problem.  If you built it with V1.1, it depends what compiler switches you used.  Let's resolve the issue off-line from this blog, and then I can post the resolution back here -- for anyone else with this problem -- if it's what I suspect.

The problem seems to be mentioned at http://support.microsoft.com/default.aspx?scid=kb;en-us;309694.  However, I don't see an updated article with the 1.1 solution which is more palatable than the one described in the 309694 knowledge base article.  Starting with 1.1, there's a Managed C++ compiler switch that allows you to control this situation.</description></item><item><title>RE: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#51476</link><pubDate>Tue, 06 Jan 2004 17:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:51476</guid><dc:creator>Rocco</dc:creator><description>Chris,

What is the Managed C++ compiler switch?

Rocco</description></item><item><title>AppDomains (</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#58489</link><pubDate>Wed, 14 Jan 2004 07:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:58489</guid><dc:creator>A Blog for Graymad</dc:creator><description /></item><item><title>AppDomains (</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#58492</link><pubDate>Wed, 14 Jan 2004 08:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:58492</guid><dc:creator>A Blog for Graymad</dc:creator><description /></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#72241</link><pubDate>Fri, 13 Feb 2004 05:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:72241</guid><dc:creator>Kent Brown</dc:creator><description>I am having trouble Unloading an AppDomain that has been set up to host remoting.  It give the thread cannot be unwound exception.  WHat can I do to make sure it unloads?</description></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#72533</link><pubDate>Fri, 13 Feb 2004 19:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:72533</guid><dc:creator>Chris Brumme</dc:creator><description>Rocco, the managed C++ compiler switch is /clr:initialAppDomain.</description></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#72537</link><pubDate>Fri, 13 Feb 2004 19:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:72537</guid><dc:creator>Chris Brumme</dc:creator><description>Kent, the first thing you should do is get a stack trace of the &amp;quot;reluctant&amp;quot; thread.  Most likely it is performing unmanaged blocking rather than managed blocking.  Less likely, it is executing CPU-intensive unmanaged code.  In either case, the CLR cannot safely take control of the thread.  If it is performing unmanaged blocking, consider switching it over to managed blocking instead.  (See my post on Managed Blocking, or the most recent post on Apartments and Pumping for additional detail).&lt;br&gt;&lt;br&gt;</description></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#95248</link><pubDate>Wed, 24 Mar 2004 17:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:95248</guid><dc:creator>Stuart</dc:creator><description>I have a question which may betray a fundamental misconception about what AppDomains are supposed to do, or may have a trivially simple answer.&lt;br&gt;&lt;br&gt;When you talk about domain-neutral assemblies above, you then state that even domain-neutral assemblies need per-AppDomain state for their static variables. You state this as a foregone conclusion.&lt;br&gt;&lt;br&gt;However, the problem domain that I'm trying to tackle (for which I hope that AppDomains may be the answer) specifically needs all state (including static variables if there are any) in one assembly to be *shared* across all the AppDomains that it loads.&lt;br&gt;&lt;br&gt;My scenario is sort of like a plugin system: Host application loads several assemblies that it wants to isolate from itself and each other and set limited permissions on, and then runs code inside those assemblies (which implement a predefined interface eg IPlugin that's defined in the host application), passing them objects through which they can manipulate the host environment in certain well-defined ways.&lt;br&gt;&lt;br&gt;So the host application state is truly global, and when one of the plugins invokes a method which accesses static variables in the host app, it really should be accessing a *single* copy of that static variable, not a separate one per plugin.&lt;br&gt;&lt;br&gt;Am I trying to abuse AppDomains by wanting to do this, or is it a valid use of them, and if so, what would I need to do in the host application to get the semantics I want?&lt;br&gt;&lt;br&gt;(Currently, my code ignores the isolation and security issues and just does the following (apologies for syntax problems, I'm typing this from memory), which are the semantics I'm trying to preserve:&lt;br&gt;&lt;br&gt;Assembly asm = Assembly.LoadFrom(path);&lt;br&gt;// get some custom attributes on the assembly to find the name of a type that implements IPlugin&lt;br&gt;Type type = asm.GetType(typeName);&lt;br&gt;ConstructorInfo cons = type.GetConstructor(new Type[] {})&lt;br&gt;IPlugin plugin = (IPlugin) cons.Invoke(new object[] {});&lt;br&gt;plugin.PluginMethod(pluginAPIObject);&lt;br&gt;&lt;br&gt;)</description></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#95970</link><pubDate>Thu, 25 Mar 2004 16:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:95970</guid><dc:creator>Martin</dc:creator><description>Hi guys. Since you seem to know so much about appdomains, maybe you could find the time to help me out here. See, I have a windows service that keeps calling a web service. Problem is, after a while (12-13 hours) I get this error &amp;quot;AppdomainUnloadedException&amp;quot; apparently in the middle of the processing of the data by the web service. Until that happens the calls to the web service have executed in the same iis session.&lt;br&gt;Is there some web.config or iis setting that eludes me or can I stop this by catching this exception in global.asax? The application in the iis does not exit.&lt;br&gt;I add the call stack for whatever good it will do:&lt;br&gt;&lt;br&gt;[AppDomainUnloadedException]: Attempted to access an unloaded AppDomain.&lt;br&gt;   at System.Threading.Thread.SetCompressedStackInternal(IntPtr unmanagedCompressedStack)&lt;br&gt;   at System.Threading.Thread.SetCompressedStack(CompressedStack stack)&lt;br&gt;   at System.Xml.XmlTextReader.CreateScanner()&lt;br&gt;   at System.Xml.XmlTextReader.Init()&lt;br&gt;   at System.Xml.XmlTextReader.Read()&lt;br&gt;   at System.Xml.XmlReader.MoveToContent()&lt;br&gt;   at System.Web.Configuration.XmlUtil.OpenXmlTextReader()&lt;br&gt;   at System.Web.Configuration.HttpConfigurationRecord..ctor(String filename, HttpConfigurationRecord parent, Boolean inheritable, String path)&lt;br&gt;[ConfigurationException]: The XML file c:\winnt\microsoft.net\framework\v1.1.4322\Config\machine.config could not be loaded.  Attempted to access an unloaded AppDomain. (c:\winnt\microsoft.net\framework\v1.1.4322\Config\machine.config)&lt;br&gt;   at System.Web.Configuration.HttpConfigurationSystem.CacheLookup(String vpath)&lt;br&gt;   at System.Web.Configuration.HttpConfigurationSystem.ComposeConfig(String reqPath, IHttpMapPath configmap)&lt;br&gt;   at System.Web.HttpContext.GetCompleteConfigRecord(String reqpath, IHttpMapPath configmap)&lt;br&gt;   at System.Web.HttpContext.GetCompleteConfig(String path)&lt;br&gt;   at System.Web.HttpContext.GetAppLKGConfig(String name)&lt;br&gt;--&amp;gt;&lt;br&gt;--.&lt;br&gt;   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream)&lt;br&gt;   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)&lt;br&gt;   at mywindowsservice.myWebService.datapush.readXmlBytes(Byte[] data, String parameter)&lt;br&gt;&lt;br&gt;Any suggestions will be appreciated.&lt;br&gt; /Martin</description></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#96420</link><pubDate>Fri, 26 Mar 2004 01:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:96420</guid><dc:creator>Chris Brumme</dc:creator><description>Stuart,&lt;br&gt;&lt;br&gt;The vast majority of static fields are cloned for each AppDomain.  A few others are cloned for each thread for each AppDomain or for each Context for each AppDomain.  In other words, they are scoped at an even finer granularity than per AppDomain.  We also support RVA-based static fields, which are process global.  However, such statics can only contain primitive values.  This is to avoid the potential of bleeding instances across an AppDomain boundary, but they may be sufficient for your needs.  (All of the above is in my very first blog, entitled &amp;quot;Static Fields&amp;quot;).&lt;br&gt;&lt;br&gt;Any objects must be marshaled somehow across the AppDomain boundary.  This is intentional.  Think of this like the address space separation of unmanaged processes.  Our equivalent of memory mapping could be considered either agile objects or RVA-based statics.</description></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#96425</link><pubDate>Fri, 26 Mar 2004 02:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:96425</guid><dc:creator>Chris Brumme</dc:creator><description>Martin,&lt;br&gt;&lt;br&gt;It sounds like you might be running in ASP.NET.  If this is the case, then ASP.NET will unload AppDomains for a variety of reasons.  This includes changes to the application running in the AppDomain (they use file change notifications to monitor your aspx files, config files, etc.), and it includes high resource usage.  I don't know whether there are other circumstances that cause this -- like perhaps they age out old applications after a long period of inactivity.&lt;br&gt;&lt;br&gt;If you are not running in ASP.NET and you don't believe AppDomains should be unloaded, I would recommend setting a breakpoint on AppDomain.Unload and see who the caller is.</description></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#96647</link><pubDate>Fri, 26 Mar 2004 10:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:96647</guid><dc:creator>Martin</dc:creator><description>Chris:&lt;br&gt;Yes, I'm running this in asp.net. I think I'll take your advice and check out the unload method to try to find out if I can stop it from unloading. A posting on another site suggested I look at the asp(x) script timeout, maybe I hadn't set it high enough after all. Thanks for your help.&lt;br&gt; /Martin</description></item><item><title>re: IServiceProvider and Plugin Architecture</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#128626</link><pubDate>Sun, 09 May 2004 06:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:128626</guid><dc:creator>Something Clever</dc:creator><description /></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#142224</link><pubDate>Wed, 26 May 2004 15:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:142224</guid><dc:creator>Mark Traudt</dc:creator><description>In reference to:&lt;br&gt;&lt;br&gt;There’s so much more I had intended to write about.  For example, some ambiguities exist when unmanaged (process-wide) code calls into Managed C++ and has to select a target AppDomain.  This can be controlled by flags in the VTFixup entries that are used by the IJW thunks. &lt;br&gt;&lt;br&gt;This is a topic I am trying to get a better understanding of.  We are having problems with a Managed C++ DLL that has a non-default appdomain and does LOTS of unmanaged calls (both P/Invoke and COM Interop).  Also, the managed code is frequently called back by the unmanaged code.&lt;br&gt;&lt;br&gt;The code is compiled using VS .NET 2003 and we are running on 1.1 of the CLR.  Interestingly, using the &amp;quot;initialAppDomain&amp;quot; flag SEEMS to make the problem go away, but we do not want to use this flag since we support unloading our app domain.&lt;br&gt;&lt;br&gt;On www.msdnaa.net, they say that:&lt;br&gt;&lt;br&gt;With version 1.1 of the .NET Framework, the vtable includes a flag that indicates to the runtime that if the call comes into the assembly from native code, the application domain that's used will be that of the last application domain used to call into native code.&lt;br&gt;&lt;br&gt;But won't this cause problems if you have managed/unmanaged transitions from multiple domains?  What if I just called into unmanaged code from Domain A, and then receive a callback that really should be directed to Domain B?  How can you ever reliably receive callbacks if you call unmanaged code from multiple domains?&lt;br&gt;&lt;br&gt;</description></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#142650</link><pubDate>Thu, 27 May 2004 02:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:142650</guid><dc:creator>Mark Traudt</dc:creator><description>Well, through lots of experimentation we were able to fully understand the behavior with and without the &amp;quot;/clr:initialAppDomain&amp;quot; flag.&lt;br&gt;&lt;br&gt;This is a topic that needs more detailed documentation from Microsoft, so that others don't go through what we went through.  &lt;br&gt;&lt;br&gt;For example, the docs seem to imply that the only reason you would use this flag is if you want to run on CLR 1.0.  However, there are some cases where the 1.0 behavior makes more sense.&lt;br&gt;&lt;br&gt;Also, on MSDNAA they describe the 1.0 behavior as:&lt;br&gt;&lt;br&gt;&amp;quot;In the first version of the Framework, the runtime was consistent and ensured that the callback into managed code would go to the first application domain.&amp;quot;&lt;br&gt;&lt;br&gt;I originally took &amp;quot;first application domain&amp;quot; to mean the first app domain loaded into the runtime.  However, I think they really mean &amp;quot;the first application domain this assembly is loaded into&amp;quot;.  Is that correct?&lt;br&gt;</description></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#152499</link><pubDate>Thu, 10 Jun 2004 14:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:152499</guid><dc:creator>Lyon</dc:creator><description>Chris: &lt;br&gt;&lt;br&gt;I am new to AppDomains and do not quite understand &amp;quot;a given thread is not confined to a single application domain&amp;quot;, also &amp;quot;multiple disjoint regions of stack&amp;quot; and how threads &amp;quot;stack in&amp;quot;.&lt;br&gt;Could you please further explain or advise where I can get more detail.&lt;br&gt;&lt;br&gt;thank you</description></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#152500</link><pubDate>Thu, 10 Jun 2004 14:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:152500</guid><dc:creator>Lyon</dc:creator><description>Chris: &lt;br&gt;&lt;br&gt;I am new to AppDomains and do not quite understand &amp;quot;a given thread is not confined to a single application domain&amp;quot;, also &amp;quot;multiple disjoint regions of stack&amp;quot; and how threads &amp;quot;stack in&amp;quot;.&lt;br&gt;Could you please further explain or advise where I can get more detail.&lt;br&gt;&lt;br&gt;thank you</description></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#170901</link><pubDate>Thu, 01 Jul 2004 17:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:170901</guid><dc:creator>Chris Brumme</dc:creator><description>Mark,&lt;br&gt;&lt;br&gt;You are correct that 'initialAppDomain' means the first AppDomain that the assembly is loaded into, rather than the first AppDomain of the process.  And I agree with you that there are scenarios where initialAppDomain is preferred -- though this position has been disputed by some of the folks over here.&lt;br&gt;&lt;br&gt;I think you will probably see some improvements in this area in Whidbey (hopefully with some documentation improvements, too).  However, I don't think those improvements made the first Whidbey Beta.</description></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#170910</link><pubDate>Thu, 01 Jul 2004 18:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:170910</guid><dc:creator>Chris Brumme</dc:creator><description>Lyon,&lt;br&gt;&lt;br&gt;AppDomains are boundaries around groups of objects within a process.  Threads live within a process, rather than within any one of these AppDomain boundaries.  When a thread calls from one AppDomain to another, it passes through the boundary and leaves a special marker frame on the stack.  When the thread returns from the second AppDomain, the marker frame is popped off the stack during the reverse transition.&lt;br&gt;&lt;br&gt;If you look at the stack of a thread, you can imagine segments of stack separated by the marker frames.  These segments between the marker frames are what I meant by &amp;quot;multiple disjoint regions of stack.&amp;quot;</description></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#180440</link><pubDate>Mon, 12 Jul 2004 11:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:180440</guid><dc:creator>MIGUELÓN</dc:creator><description>Hi, &lt;br&gt;&lt;br&gt;I'm newbie in this tasks related to application domains and I would like a rapid and a simple advice for using them correctly:&lt;br&gt;&lt;br&gt;1. Should I manage myself application domains, or should I let the CLR manage them? In what cases does this personal management deserve? Does alter performance of the application?&lt;br&gt;&lt;br&gt;2. Does CLR perform a good management of applicacion domains by default, without managing nothing myself? &lt;br&gt;&lt;br&gt;3. By default, a .NET application (Winforms, ASP.NET, etc.) maps to one (and only one) application domain? 1 process --&amp;gt; 1 application domain --&amp;gt; a .NET application?. </description></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#180595</link><pubDate>Mon, 12 Jul 2004 16:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:180595</guid><dc:creator>Chris Brumme</dc:creator><description>The CLR (meaning the runtime engine) doesn't manage application domains itself.  Instead, the application or some application framework is responsible for creating them, executing code in them, and destroying them.&lt;br&gt;&lt;br&gt;In the case of ASP.NET, this is handled by the application framework.  It does a great job and there is no reason for you to interfere.&lt;br&gt;&lt;br&gt;In the case of WinForms, a WinForms app typically has a single application domain.  For most GUI applications, this is appropriate.  If you have an add-in model based on WinForms where it makes sense to use different AppDomains for each add-in (for all the usual reasons like isolation of binding, ability to unload, ability to have a distinct security policy, etc.) then your add-in model should create and manage the appdomains.</description></item><item><title>re: Whidbey breaking change --- Caching binding failures</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#191428</link><pubDate>Thu, 22 Jul 2004 20:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:191428</guid><dc:creator>Junfeng Zhang's .Net Framework Notes</dc:creator><description /></item><item><title>re: AppDomains ("application domains")</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#204745</link><pubDate>Mon, 02 Aug 2004 09:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:204745</guid><dc:creator>dianyingxiazai</dc:creator><description>[href=//www.dmoz.net.cn/ title=&amp;quot;wangzhidaquang&amp;quot;]&lt;br&gt;[href=//www.86dmoz.com/ title=&amp;quot;jingpingwangzhi&amp;quot;]&lt;br&gt;[href=//www.kamun.com/ title=&amp;quot;mianfeidianying&amp;quot;]&lt;br&gt;[href=//www.kamun.com/ title=&amp;quot;dianyingxiazai&amp;quot;]&lt;br&gt;[href=//www.kamun.com/ title=&amp;quot;MP3 free download&amp;quot;]&lt;br&gt;[href=//www.pc530.net/ title=&amp;quot;diannaoaihaozhe&amp;quot;]&lt;br&gt;[href=//www.5icc.com/ title=&amp;quot;duangxingcaixingxiazha&amp;quot;]&lt;br&gt;[href=//www.dianyingxiazai.com/ title=&amp;quot;dianyingxiazai&amp;quot;]&lt;br&gt;[href=//www.yinyuexiazai.com/ title=&amp;quot;yinyuexiazai&amp;quot;]</description></item><item><title>Domain Neutral Assemblies</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#208376</link><pubDate>Thu, 05 Aug 2004 02:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:208376</guid><dc:creator>Junfeng Zhang's .Net Framework Notes</dc:creator><description /></item><item><title>Failures in AppDomain.Unload</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#250633</link><pubDate>Mon, 01 Nov 2004 20:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:250633</guid><dc:creator>manish godse's remoting blog</dc:creator><description /></item><item><title>Immutable arrays as value objects</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#408847</link><pubDate>Sat, 16 Apr 2005 19:06:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:408847</guid><dc:creator>Hackward and Foreword</dc:creator><description /></item><item><title>Immutable arrays as value objects</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#416246</link><pubDate>Wed, 11 May 2005 04:50:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:416246</guid><dc:creator>Hackward and Foreword</dc:creator><description /></item><item><title>Special threads in CLR</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#438070</link><pubDate>Tue, 12 Jul 2005 21:32:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:438070</guid><dc:creator>Yun Jin's WebLog</dc:creator><description>Question: How many threads does a typical managed process have when it just starts to run?&amp;amp;amp;nbsp;&amp;amp;amp;nbsp;...</description></item><item><title>Closing Documents Programmatically is not simple</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#442867</link><pubDate>Mon, 25 Jul 2005 07:22:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:442867</guid><dc:creator>Misha Shneerson</dc:creator><description>Both Word and Excel OMs have APIs that allow closing documents programmatically. I suppose there are...</description></item><item><title>How many threads does a typical managed process have when it just starts to run?</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#453131</link><pubDate>Thu, 18 Aug 2005 19:33:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:453131</guid><dc:creator>C#, VS Deployment and all geek talk</dc:creator><description /></item><item><title>Special threads in CLR</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#457336</link><pubDate>Sun, 28 Aug 2005 22:44:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:457336</guid><dc:creator>Yun Jin's WebLog</dc:creator><description>Question: How many threads does a typical managed process have when it just starts to run?&amp;amp;amp;nbsp;&amp;amp;amp;nbsp;...</description></item><item><title>Closing Documents Programmatically is not simple</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#470807</link><pubDate>Sun, 18 Sep 2005 09:54:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:470807</guid><dc:creator>Misha Shneerson</dc:creator><description>Both Word and Excel OMs have APIs that allow closing documents programmatically. I suppose there are...</description></item><item><title>Creating and Working with Applications in AppDomains</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#3702389</link><pubDate>Thu, 05 Jul 2007 14:34:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3702389</guid><dc:creator>Infosys | Microsoft</dc:creator><description>&lt;p&gt;How to create and work with applications in AppDomains&lt;/p&gt;
</description></item><item><title>Cross-AppDomain Workflow Local Services</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#7495382</link><pubDate>Wed, 06 Feb 2008 21:03:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7495382</guid><dc:creator>All Your Base Are Belong To Us</dc:creator><description>&lt;p&gt;I stumbled across an interesting issue today that I thought might be worth sharing.&amp;amp;#160; The design&lt;/p&gt;
</description></item><item><title>Web Garden, AppDomain, statics… when Sql Server is not enough to save your session</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#8344638</link><pubDate>Sun, 30 Mar 2008 23:34:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8344638</guid><dc:creator>A developer's strayings</dc:creator><description>&lt;p&gt;Things have gone a bit crazy lately, we&amp;amp;#8217;ve been under a huge workload and the time left for blogging&lt;/p&gt;
</description></item><item><title>Using Overlapped I/O from Managed Code</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#8776150</link><pubDate>Sat, 26 Jul 2008 20:20:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8776150</guid><dc:creator>beefycode.com</dc:creator><description>&lt;p&gt;Using Overlapped I/O from Managed Code&lt;/p&gt;
</description></item><item><title>Bad Locking Patterns</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#8785017</link><pubDate>Mon, 28 Jul 2008 20:40:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8785017</guid><dc:creator>Programming tidbits: store &amp; retrieve</dc:creator><description>&lt;p&gt;Multithreading adds the overhead of making sure data is accessed in a thread safe way. Win32 API uses&lt;/p&gt;
</description></item><item><title>kevin Mocha - More about app domain</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#8955977</link><pubDate>Wed, 17 Sep 2008 21:33:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8955977</guid><dc:creator>kevin Mocha - More about app domain</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blog.lulutech.com/PermaLink,guid,5666c934-98e2-4433-90c1-d09d6cc4d55a.aspx"&gt;http://blog.lulutech.com/PermaLink,guid,5666c934-98e2-4433-90c1-d09d6cc4d55a.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> cbrumme s WebLog AppDomains application domains | Insomnia Cure</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#9710147</link><pubDate>Tue, 09 Jun 2009 01:18:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9710147</guid><dc:creator> cbrumme s WebLog AppDomains application domains | Insomnia Cure</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://insomniacuresite.info/story.php?id=3323"&gt;http://insomniacuresite.info/story.php?id=3323&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> cbrumme s WebLog AppDomains application domains | Cellulite Creams</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#9712387</link><pubDate>Tue, 09 Jun 2009 06:11:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9712387</guid><dc:creator> cbrumme s WebLog AppDomains application domains | Cellulite Creams</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://cellulitecreamsite.info/story.php?id=756"&gt;http://cellulitecreamsite.info/story.php?id=756&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> cbrumme s WebLog AppDomains application domains | home lighting</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#9747168</link><pubDate>Sun, 14 Jun 2009 05:02:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9747168</guid><dc:creator> cbrumme s WebLog AppDomains application domains | home lighting</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://homelightingconcept.info/story.php?id=2148"&gt;http://homelightingconcept.info/story.php?id=2148&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> cbrumme s WebLog AppDomains application domains | fix my credit</title><link>http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx#9764720</link><pubDate>Wed, 17 Jun 2009 05:16:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9764720</guid><dc:creator> cbrumme s WebLog AppDomains application domains | fix my credit</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://fixmycrediteasily.info/story.php?id=975"&gt;http://fixmycrediteasily.info/story.php?id=975&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>