"Additionally, this sample shows how to achieve AppDomain isolation for loading of assemblies to maintain security boundaries for untrusted assemblies."
Private Function GetCoupler() As IBatchCoupler Dim CouplerProxy As IBatchCoupler = Nothing Try ThisLogger.DebugFormat("Creating Coupler for {0}", mName) Dim DomainSetupInfo As AppDomainSetup = New AppDomainSetup() DomainSetupInfo.ConfigurationFile = Path.Combine(mFilePath, "web.config") DomainSetupInfo.ApplicationBase = Path.Combine(mFilePath, "bin") DomainSetupInfo.ShadowCopyFiles = "true" Dim domain As AppDomain = AppDomain.CreateDomain(mName.Replace(" ", "") & "AppDomain", AppDomain.CurrentDomain.Evidence, DomainSetupInfo) 'Create remote object in new appDomain via the coupler interface 'to avoid loading the design library into the calling application's primary appDomain CouplerProxy = domain.CreateInstanceFromAndUnwrap(Path.Combine(DomainSetupInfo.ApplicationBase, "Design.dll"), "BigApplication.Design.BatchCoupler") ThisLogger.DebugFormat("Coupler created for {0}", mName) Catch ex As Exception ThisLogger.Error(ex) End Try Return CouplerProxy End Function
Dim domain As AppDomain = AppDomain.CreateDomain(mName.Replace(" ", "") & "AppDomain", AppDomain.CurrentDomain.Evidence, DomainSetupInfo)
Remember Me
Theme design by Dean Fiala
Pick a theme: BlogXP calmBlue Candid Blue dasBlog Discreet Blog Blue Elegante essence Just Html Mono Movable Radio Blue Movable Radio Heat orangeCream Portal Project84 Slate Sound Waves Tricoleur windmill
Powered by: newtelligence dasBlog 2.1.8102.813
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2008, Dean Fiala
E-mail