开发者

application domain for silverlight

Before the CLR executes the first line of the managed code, it creates three application domains system domain ,shared domain, default Appdomain. Additional Appdomain domains can be created from within managed code using the AppDomain.CreateDomain method or from unmanaged hosting code using the ICORRuntimeHost interface.

Means there can multiple appdomain in single application. My questions are.

question 1> silverlight solution consist with two project silverlight project and web project,it means there will be two appdomin for this solution.thats way cross domain policy occurs in silverli开发者_开发问答ght. let me know is i am right or wrong.

question 2> as silverlight is treated as window application,so where appdomain for silverlight application get created on client side or on server.


Question 1: You are kind of right but for the wrong reasons. There are two app domains but they exist in different processes and indeed on different machines. You are confusing two entirely different concepts that both happen to use the word "domain".

.NET uses AppDomains as a mechanism to allow a single operating system process to host multiple app instances. The AppDomains create boundarys between the applcations such that the different applications can't just read each others data and directly call each others code. Data transfer and method calling (if necessary) needs to be marshalled.

The "domain" in "cross domain policy" refers the DNS domain and host names of web servers. Such a policy is needed by a web server which wants to provided data to a Silverlight application that may be hosted on a different server.

Question 2: Silverlight creates its own version of an AppDomain on the client in the operating system process being used by the browser.


Four domain created for silverlight Client application 1> SystemDomain 2> SharedDomain 3> DefaultDomain 4> SilverlightAppDomain And All four Domain Created On client (Where ever silverlight Application Runs). SystemDomain and Shared domain created persystem where else DefaultDomain and SilverlightAppDomain created perbrowser.

Where else Three domain created for silverlight Web project 1> SystemDomain 2> SharedDomain 3>DefaultDomain And All three Domain Created On server.

Domain created for silverlight Client Are As follows.

System Domain: 77c59ef8
LowFrequencyHeap: 77c5a204
HighFrequencyHeap: 77c5a250
StubHeap: 77c5a29c
Stage: OPEN
Name: None

Shared Domain: 77c5a6d8
LowFrequencyHeap: 77c5a204
HighFrequencyHeap: 77c5a250
StubHeap: 77c5a29c
Stage: OPEN
Name: None
Assembly: 05750b08 [C:\Program Files\Microsoft Silverlight\4.0.60531.0\System.Net.dll]
(Other required Dll(Modules ) are also included)

Domain 1: 05769018
LowFrequencyHeap: 0576938c
HighFrequencyHeap: 057693d8
StubHeap: 05769424
Stage: OPEN
SecurityDescriptor: 03352010
Name: DefaultDomain
Assembly: 05751b80 [C:\Program Files\Microsoft Silverlight\4.0.60531.0\mscorlib.dll] ClassLoader: 033392e0 SecurityDescriptor: 03313f00

Domain 2: 0587d618
LowFrequencyHeap: 0587d98c
HighFrequencyHeap: 0587d9d8
StubHeap: 0587da24
Stage: OPEN
SecurityDescriptor: 03352190
Name: Silverlight AppDomain
(Other required Dll(Modules ) are also included)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜