Enterprise Library 4 in XBAP Partial Trust application

Topics: Caching Application Block
Jul 8, 2008 at 8:39 AM
Hi,

I have to use EntLib 4.0 in my XBAP Application(Partial Trust/Internetzone).

ICacheManager cm = CacheFactory.GetCacheManager();

The above code thrown the following exception (Stack trace) . Please give any solution for this exception.

System.TypeInitializationException: The type initializer for 'Microsoft.Practices.EnterpriseLibrary.Caching.CacheFactory' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Practices.EnterpriseLibrary.Common.Configuration.SystemConfigurationSource' threw an exception. ---> System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
   at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
   at System.Security.CodeAccessPermission.Demand()
   at System.AppDomainSetup.VerifyDir(String dir, Boolean normalize)
   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.SystemConfigurationSourceImplementation..ctor(Boolean refresh)
   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.SystemConfigurationSource..cctor()
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.FileIOPermission
The first permission that failed was:
<IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
PathDiscovery="C:\Documents and Settings\lakshminarayanan.c\Local Settings\Apps\2.0\W4LY1V5Z.WLX\ZRAXBO7E.CO6\wpfb..xbap_023680fc7eff9c0f_0004.0000_f5c98bf43de91aa6\WpfBrowserApplication3.exe.config"/>

The demand was for:
<IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
PathDiscovery="C:\Documents and Settings\lakshminarayanan.c\Local Settings\Apps\2.0\W4LY1V5Z.WLX\ZRAXBO7E.CO6\wpfb..xbap_023680fc7eff9c0f_0004.0000_f5c98bf43de91aa6\WpfBrowserApplication3.exe.config"/>

The granted set of the failing assembly was:
<PermissionSet class="System.Security.PermissionSet"
version="1">
<IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="USERNAME"/>
<IPermission class="System.Security.Permissions.FileDialogPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Unrestricted="true"/>
<IPermission class="System.Security.Permissions.IsolatedStorageFilePermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Allowed="AssemblyIsolationByUser"
UserQuota="9223372036854775807"
Expiry="9223372036854775807"
Permanent="True"/>
<IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Flags="ReflectionEmit"/>
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Flags="Assertion, Execution, BindingRedirects"/>
<IPermission class="System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Unrestricted="true"/>
<IPermission class="System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1">
<ConnectAccess>
<URI uri="(http|https)://localhost/.*"/>
</ConnectAccess>
</IPermission>
<IPermission class="System.Drawing.Printing.PrintingPermission, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
version="1"
Level="DefaultPrinting"/>
<IPermission class="System.Security.Permissions.MediaPermission, WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
version="1"
Audio="SafeAudio"
Video="SafeVideo"
Image="SafeImage"/>
<IPermission class="System.Security.Permissions.WebBrowserPermission, WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
version="1"
Level="Safe"/>
<IPermission class="System.Net.DnsPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Unrestricted="true"/>
</PermissionSet>

The assembly or AppDomain that failed was:
Microsoft.Practices.EnterpriseLibrary.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
The Zone of the assembly that failed was:
MyComputer
The Url of the assembly that failed was:
file:///C:/Documents and Settings/lakshminarayanan.c/Local Settings/Apps/2.0/W4LY1V5Z.WLX/ZRAXBO7E.CO6/wpfb..xbap_023680fc7eff9c0f_0004.0000_f5c98bf43de91aa6/Microsoft.Practices.EnterpriseLibrary.Common.DLL
   --- End of inner exception stack trace ---
   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.SystemConfigurationSource..ctor()
   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceFactory.Create()
   at Microsoft.Practices.EnterpriseLibrary.Caching.CacheFactory..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.Practices.EnterpriseLibrary.Caching.CacheFactory.GetCacheManager()
   at WpfBrowserApplication3.Page1.button1_Click(Object sender, RoutedEventArgs e)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.StartDispatcherInBrowser(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

-----------------------

PresentationHost.exe v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\system32\PresentationHost.exe
ntdll.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\ntdll.dll
kernel32.dll v5.1.2600.3119 (xpsp_sp2_gdr.070416-1301) - C:\WINDOWS\system32\kernel32.dll
SYSFER.DLL v11.0.2000.1231 - C:\WINDOWS\SYSTEM32\SYSFER.DLL
NETAPI32.dll v5.1.2600.2976 (xpsp_sp2_gdr.060817-0106) - C:\WINDOWS\system32\NETAPI32.dll
ADVAPI32.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\ADVAPI32.dll
RPCRT4.dll v5.1.2600.3173 (xpsp_sp2_gdr.070709-0051) - C:\WINDOWS\system32\RPCRT4.dll
Secur32.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\Secur32.dll
msvcrt.dll v7.0.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\msvcrt.dll
USER32.dll v5.1.2600.3099 (xpsp_sp2_gdr.070308-0222) - C:\WINDOWS\system32\USER32.dll
GDI32.dll v5.1.2600.3316 (xpsp_sp2_gdr.080219-1316) - C:\WINDOWS\system32\GDI32.dll
ole32.dll v5.1.2600.2726 (xpsp_sp2_gdr.050725-1528) - C:\WINDOWS\system32\ole32.dll
SHELL32.dll v6.00.2900.3241 (xpsp_sp2_gdr.071025-1248) - C:\WINDOWS\system32\SHELL32.dll
SHLWAPI.dll v6.00.2900.3354 (xpsp_sp2_gdr.080417-1412) - C:\WINDOWS\system32\SHLWAPI.dll
urlmon.dll v6.00.2900.3354 (xpsp_sp2_gdr.080417-1412) - C:\WINDOWS\system32\urlmon.dll
VERSION.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\VERSION.dll
mscoree.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\system32\mscoree.dll
WININET.dll v6.00.2900.3354 (xpsp_sp2_gdr.080417-1412) - C:\WINDOWS\system32\WININET.dll
CRYPT32.dll v5.131.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\CRYPT32.dll
MSASN1.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\MSASN1.dll
OLEAUT32.dll v5.1.2600.3266 - C:\WINDOWS\system32\OLEAUT32.dll
IMM32.DLL v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\IMM32.DLL
LPK.DLL v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\LPK.DLL
USP10.dll v1.0420.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\USP10.dll
comctl32.dll v6.0 (xpsp.060825-0040) - C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
uxtheme.dll v6.00.2900.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\uxtheme.dll
CLBCATQ.DLL v2001.12.4414.308 - C:\WINDOWS\system32\CLBCATQ.DLL
COMRes.dll v2001.12.4414.258 - C:\WINDOWS\system32\COMRes.dll
xpsp2res.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\xpsp2res.dll
mlang.dll v6.00.2900.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\mlang.dll
wsock32.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\wsock32.dll
WS2_32.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\WS2_32.dll
WS2HELP.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\WS2HELP.dll
mswsock.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\mswsock.dll
hnetcfg.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\hnetcfg.dll
wshtcpip.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\System32\wshtcpip.dll
dfshim.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\system32\dfshim.dll
MSVCR80.dll v8.00.50727.1433 - C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\MSVCR80.dll
mscorwks.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
PresentationHostDLL.dll v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\Microsoft.Net\Framework\v3.0\WPF\PresentationHostDLL.dll
mscorlib.ni.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\32e6f703c114f3a971cbe706586e3655\mscorlib.ni.dll
System.ni.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\ba0e3a22211ba7343e0116b051f2965a\System.ni.dll
WindowsBase.ni.dll v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\WindowsBase\0703021437c2ec71213a6b701771be86\WindowsBase.ni.dll
PresentationCore.ni.dll v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationCore\011f8e31d197b4ccb6a61c2267a38e5c\PresentationCore.ni.dll
PresentationFramework.ni.dll v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationFramewo#\60421dda88800b14dc101ed9dca422fe\PresentationFramework.ni.dll
msctfime.ime v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\msctfime.ime
actxprxy.dll v6.00.2900.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\actxprxy.dll
SXS.DLL v5.1.2600.3019 (xpsp_sp2_gdr.061019-0414) - C:\WINDOWS\system32\SXS.DLL
PresentationHostProxy.dll v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\system32\PresentationHostProxy.dll
PresentationUI.ni.dll v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationUI\6d2716a55eb8ce6fc4cbf83f3ab329e3\PresentationUI.ni.dll
System.Deployment.ni.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Deployment\c7dea4895e1fa33d65e448c03de48d26\System.Deployment.ni.dll
shfolder.dll v6.00.2900.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\shfolder.dll
rsaenh.dll v5.1.2600.2161 (xpsp.040706-1629) - C:\WINDOWS\system32\rsaenh.dll
System.Configuration.ni.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Configuration\eee9b48577689e92db5a7b5c5de98d9b\System.Configuration.ni.dll
System.Xml.ni.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Xml\c98cb65a79cfccb44ea727ebe4593ede\System.Xml.ni.dll
rasapi32.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\rasapi32.dll
rasman.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\rasman.dll
TAPI32.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\TAPI32.dll
rtutils.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\rtutils.dll
WINMM.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\WINMM.dll
DNSAPI.dll v5.1.2600.3316 (xpsp_sp2_gdr.080219-1316) - C:\WINDOWS\system32\DNSAPI.dll
winrnr.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\System32\winrnr.dll
WLDAP32.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\WLDAP32.dll
rasadhlp.dll v5.1.2600.2938 (xpsp_sp2_gdr.060626-0020) - C:\WINDOWS\system32\rasadhlp.dll
iphlpapi.dll v5.1.2600.2912 (xpsp_sp2_gdr.060519-0003) - C:\WINDOWS\system32\iphlpapi.dll
MilCore.dll v6.0.6001.17014 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\system32\MilCore.dll
PSAPI.DLL v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\PSAPI.DLL
System.Security.ni.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Security\2b5994269cc5b996231c9b21afea9a91\System.Security.ni.dll
WindowsCodecs.dll v6.0.5840.16388 (winmain(wmbla).061024-1209) - C:\WINDOWS\system32\WindowsCodecs.dll
cryptnet.dll v5.131.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\cryptnet.dll
WINHTTP.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\WINHTTP.dll
SensApi.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\SensApi.dll
USERENV.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\USERENV.dll
PresentationFramework.Luna.ni.dll v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationFramewo#\3f18bff5107c9a8accae6c248fdf3c2e\PresentationFramework.Luna.ni.dll
NTDSAPI.DLL v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\NTDSAPI.DLL
kerberos.dll v5.1.2600.2698 (xpsp_sp2_gdr.050614-1522) - C:\WINDOWS\system32\kerberos.dll
cryptdll.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\cryptdll.dll
PresentationNative_v0300.dll v3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109) - C:\WINDOWS\system32\PresentationNative_v0300.dll
System.Drawing.ni.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Drawing\0e83aac37b2623f1a24c70979f31dd56\System.Drawing.ni.dll
System.Windows.Forms.ni.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Windows.Forms\3d8c79c45aa674e43f075e2e66b8caf5\System.Windows.Forms.ni.dll
jscript.dll v5.6.0.8835 - C:\WINDOWS\system32\jscript.dll
security.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\security.dll
msv1_0.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\msv1_0.dll
mscorjit.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll
d3d9.dll v5.03.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\d3d9.dll
d3d8thk.dll v5.03.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\d3d8thk.dll
mscorsec.dll v2.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorsec.dll
WINTRUST.dll v5.131.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\WINTRUST.dll
IMAGEHLP.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\IMAGEHLP.dll
Microsoft.Practices.EnterpriseLibrary.Caching.dll v4.0.0.0 - C:\Documents and Settings\lakshminarayanan.c\Local Settings\Apps\2.0\W4LY1V5Z.WLX\ZRAXBO7E.CO6\wpfb..xbap_023680fc7eff9c0f_0004.0000_f5c98bf43de91aa6\Microsoft.Practices.EnterpriseLibrary.Caching.dll
Microsoft.Practices.EnterpriseLibrary.Common.dll v4.0.0.0 - C:\Documents and Settings\lakshminarayanan.c\Local Settings\Apps\2.0\W4LY1V5Z.WLX\ZRAXBO7E.CO6\wpfb..xbap_023680fc7eff9c0f_0004.0000_f5c98bf43de91aa6\Microsoft.Practices.EnterpriseLibrary.Common.dll
diasymreader.dll v8.0.50727.1433 (REDBITS.050727-1400) - C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\diasymreader.dll

 


 

 

 


 


Jul 8, 2008 at 1:04 PM
Seems like Enterprise Library 4.0 cannot be used from the partial trust xbap application. The problem seems to come from the "SystemConfigurationSourceImplementation" which tries to read the config file from "AppDomain.CurrentDomain.SetupInformation.ConfigurationFile". Seems like in partial trust, we can't read the above property because is requires FileIOPermission.

Has anybody faced or solved this problem ?

Thanks
Jul 9, 2008 at 4:18 AM

The above exception appear only in published version not in Debug - mode.

waiting...
ramesh
Jul 9, 2008 at 5:13 PM
Hi,

I could repro it, and I'll log an issue for it. In the meantime you can perform some changes in the source code, if that's a possibility for you (but I don't know what the exact changes to the code should be, yet.)

The issue is not with partial trust per se, because partial trust is really anything that isn't full trust. It's the specific set of permissions granted by default for the local intranet zone, which doesn't include permission for path discovery on the app folder; the default set of permissions for medium trust for ASP.NET does include such a permission.

Fernando
Jul 10, 2008 at 1:30 PM

Hi Fernando,

Thanks for you reply.
So,  we can't use Enterprise Library 4.0 in XBAP/Internetzone (Not Intranet zone) without modification of Source Code.
I need cache feature in XBAP projects. Do you have suggestion?

Thanks in advance.

by
ramesh
Jul 14, 2008 at 6:45 PM
You may want to try with ASP.NET's cache, which is used by PIAB's CachingCallHandler. Please note that I don't know whether it works with XBAP apps at all; it's just a simple alternative that is already bundled with the .NET Framework.

Regards,
Fernando

rameshnkl wrote:

Hi Fernando,

Thanks for you reply.
So,  we can't use Enterprise Library 4.0 in XBAP/Internetzone (Not Intranet zone) without modification of Source Code.
I need cache feature in XBAP projects. Do you have suggestion?

Thanks in advance.

by
ramesh


Nov 16, 2008 at 9:00 AM

Hi! 

Any news on this issue in 4.1? (XBAP in partial trust)

lef

Nov 17, 2008 at 5:34 AM

I can't seem to find the logged issue for this so I can't check if it was already resolved.  It might still be an issue since there was no mention in the documentation about any changes from version 4.0.  I didn't also find any entry in the Change Log document.

 

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com

Nov 17, 2008 at 6:28 AM
This issue was logged in our internal TFS server, and was one of the ones fixed in Entlib 4.1. Please give 4.1 a try and let us know if it fixes your problem (or more importantly, if it doesn't fix your problem).