DamReev

Hi, I'm a developer who would like to leverage XBAPs for some intranet applications, but I've run into the scenario where neither XBAPs or standalone XAML displays in IE on any of our corporate PCs with .NET 3.0. It doesn't matter how I do it:

  • I can click on an XBAP on the internet, no luck
  • I can click on a Standalone XAML locally/or on the web, no luck
  • I can create a XBAP project in Visual Studio and try and run it, still no luck

I have admin access on my machines so can anyone thing of any reason why this wouldn't work. The ultimate goal is to get this working on user machines,but I have to obviously get it working on a developer machine first.

Not even the simplest helloworld xbap or xaml file works, it seems like an error occurs somewhere in PresentationHost.

I got the following error we loose xaml files in IE:

Startup URI: D:\DevCode\MSDNMagazine\Foundations\BareBonesProgressBar.xaml
Application Identity: file:///c:/WINDOWS/Microsoft.Net/Framework/v3.0/WPF/XamlViewer/XamlViewer_v0300.xbap#XamlViewer_v0300.application, Version=3.0.0.0, Culture=neutral, PublicKeyToken=c3bce3770c238a49, processorArchitecture=msil/XamlViewer_v0300.exe, Version=3.0.0.0, Culture=neutral, PublicKeyToken=c3bce3770c238a49, processorArchitecture=msil, type=win32

System.DllNotFoundException: Unable to load DLL 'msctf.dll': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)
at MS.Win32.UnsafeNativeMethods.TF_CreateThreadMgr(ITfThreadMgr& threadManager)
at MS.Internal.TextServicesLoader.Load()
at System.Windows.Threading.Dispatcher.GetMessagePump()
at System.Windows.Threading.Dispatcher.GetMessage(MSG& msg, IntPtr hwnd, Int32 minMessage, Int32 maxMessage)
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.1005 (lh_tools_devdiv_wpf_beta2(avdrt).061020-1904) - 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
ADVAPI32.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\ADVAPI32.dll
RPCRT4.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\RPCRT4.dll
USER32.dll v5.1.2600.3099 (xpsp_sp2_gdr.070308-0222) - C:\WINDOWS\system32\USER32.dll
GDI32.dll v5.1.2600.3159 (xpsp_sp2_gdr.070619-1300) - C:\WINDOWS\system32\GDI32.dll
msvcrt.dll v7.0.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\msvcrt.dll
ole32.dll v5.1.2600.2726 (xpsp_sp2_gdr.050725-1528) - C:\WINDOWS\system32\ole32.dll
SHELL32.dll v6.00.2900.3051 (xpsp_sp2_gdr.061219-0316) - C:\WINDOWS\system32\SHELL32.dll
SHLWAPI.dll v6.00.2900.2995 (xpsp.060913-0019) - C:\WINDOWS\system32\SHLWAPI.dll
urlmon.dll v7.00.6000.16512 (vista_gdr.070625-1522) - C:\WINDOWS\system32\urlmon.dll
OLEAUT32.dll v5.1.2600.3139 - C:\WINDOWS\system32\OLEAUT32.dll
iertutil.dll v7.00.6000.16512 (vista_gdr.070625-1522) - C:\WINDOWS\system32\iertutil.dll
WININET.dll v7.00.6000.16512 (vista_gdr.070625-1522) - C:\WINDOWS\system32\WININET.dll
Normaliz.dll v6.0.5441.0 (winmain(wmbla).060628-1735) - C:\WINDOWS\system32\Normaliz.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
VERSION.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\VERSION.dll
xpsp2res.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - c:\WINDOWS\system32\xpsp2res.dll
PresentationHostDLL.dll v3.0.6920.1005 (lh_tools_devdiv_wpf_beta2(avdrt).061020-1904) - c:\WINDOWS\Microsoft.Net\Framework\v3.0\WPF\PresentationHostDLL.dll
mscoree.dll v2.0.50727.1378 (REDBITSB2.050727-1300) - c:\WINDOWS\system32\mscoree.dll
Secur32.dll v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - c:\WINDOWS\system32\Secur32.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
dfshim.dll v2.0.50727.1378 (REDBITSB2.050727-1300) - c:\WINDOWS\system32\dfshim.dll
MSVCR80.dll v8.00.50727.1378 - C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1378_x-ww_5c7e3652\MSVCR80.dll
mscorwks.dll v2.0.50727.1378 (REDBITSB2.050727-1300) - c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
mscorlib.ni.dll v2.0.50727.1378 (REDBITSB2.050727-1300) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\0bca12173b2b90018614e81a671081cf\mscorlib.ni.dll
System.ni.dll v2.0.50727.1378 (REDBITSB2.050727-1300) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\bf31204e35a4ed93bc8cfbc1f9ed88fb\System.ni.dll
WindowsBase.ni.dll v3.0.6920.1005 (lh_tools_devdiv_wpf_beta2(avdrt).061020-1904) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\WindowsBase\ef3a00ca3430c1f47a827d36c0133342\WindowsBase.ni.dll
PresentationCore.ni.dll v3.0.6920.1005 (lh_tools_devdiv_wpf_beta2(avdrt).061020-1904) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationCore\64cf4a60e8db722a3c594ca52e160327\PresentationCore.ni.dll
PresentationFramework.ni.dll v3.0.6920.1005 (lh_tools_devdiv_wpf_beta2(avdrt).061020-1904) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationFramewo#\ba1ed37e079618c0233d9a957b7c6e8d\PresentationFramework.ni.dll
msctfime.ime v5.1.2600.2180 (xpsp_sp2_rtm.040803-2158) - C:\WINDOWS\system32\msctfime.ime
msi.dll v3.1.4000.2435 - c:\WINDOWS\system32\msi.dll
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.1005 (lh_tools_devdiv_wpf_beta2(avdrt).061020-1904) - c:\WINDOWS\system32\PresentationHostProxy.dll
ieproxy.dll v7.00.5730.11 (winmain(wmbla).061017-1135) - C:\Program Files\Internet Explorer\ieproxy.dll
ctagent.dll v1, 0, 0, 11 - C:\WINDOWS\system32\ctagent.dll
PresentationUI.ni.dll v3.0.6920.1005 (lh_tools_devdiv_wpf_beta2(avdrt).061020-1904) - C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationUI\1940724335d162a2beef232531bb29f9\PresentationUI.ni.dll
diasymreader.dll v8.0.50727.1378 (REDBITSB2.050727-1300) - c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\diasymreader.dll



Re: Windows Presentation Foundation (WPF) XBAPs and Loose XAML does not work on corporate PCs

Matt Galbraith

Hi,

It seems that any WPF scenario involving text ought to be broken here... msctf.dll is an OS library for text services, not something that is distributed with WPF. Most likely this machine has that file misplaced or corrupted.

Some things to try:

- Copy this DLL from a machine of the same OS

- Re-register DLL with RegSvr32

- Some combination of both of the above ...

- Reinstall OS or roll back to a point where WPF worked.

Hope this helps...

Matt






Re: Windows Presentation Foundation (WPF) XBAPs and Loose XAML does not work on corporate PCs

DamReev

I've tried what you said and it didn't work (except reinstalling the OS). Also I can't just reinstall the OS for the whole corporate network. There has to be some other solution.




Re: Windows Presentation Foundation (WPF) XBAPs and Loose XAML does not work on corporate PCs

Laurent Bugnion

Hi,

We have that same problem on our corporate PCs too. Which company are you working for (in case you can tell :-) Do the words "CAT PC" mean something to you :-)

We found out that it helps if you turn off the Advanced text services (in XP: Control Panel / Regional and languages options / Languages / Details / Advanced / Turn off advanced text services).

We also found out that we don't have this problem on Vista.

Unfortunately, the "text services" trick doesn't solve all our problems. Our strategy (after a looooong unfruitful search) is to blame management and IT, and to use Vista for XBAPs.

Greetings,
Laurent





Re: Windows Presentation Foundation (WPF) XBAPs and Loose XAML does not work on corporate PCs

DamReev

Thank you so much Laurent. That worked like a charm.

No "CAT PC" doesn't mean anything to me, and my company hasn't embraced Vista yet. In fact their VPN software doesn't even support Vista yet, so at home I actually end up running an XP Virtual PC on my Vista machine through which I connect to my company's VPN and then normally end up connecting to my work PCs via Remote Desktop Connection (talk about jumping through hoops.)

Thanks again.





Re: Windows Presentation Foundation (WPF) XBAPs and Loose XAML does not work on corporate PCs

Chango V. - MSFT

WPF does not own msctf.dll, but we might be able to get some traction with the issue if you provide us with some more actionable information. DllNotFoundException sounds misleading. But the error code suggests the DllMain() function failed. This, unfortunately, still does not suggest a specific cause. But some debugging information that's relatively easy to collect may give us a clue:

1. Running PresentationHost.exe under a native debugger and looking at the debugger output. There is OS diagnostic information for some DLL loading errors. And, I'm not sure, but I think WinDbg from the Debugging Tools for Windows enables some diagnostics that are off by default under the Visual Studio debugger, so it may be the better option.

To get this log, run PresentationHost -embedding from a command window (non-elevated if you are on Windows Vista), then attach the debugger to it (F6 in WinDbg; Tools--Attach to Process in VS), and run the XBAP normally.

2. Process Monitor log. This could reveal a problem like a missing DLL or registry key. Simply set up a filter to include events from PresentationHost.exe (a 'Process name is' filter). Leave the default Exclude filters alone.






Re: Windows Presentation Foundation (WPF) XBAPs and Loose XAML does not work on corporate PCs

DamReev

I ran WinDbg and got the following output.


Microsoft (R) Windows Debugger Version 6.6.0007.5
Copyright (c) Microsoft Corporation. All rights reserved.

*** wait with pending attach
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path. *
* Use .symfix to have the debugger choose a symbol path. *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is:
ModLoad: 00400000 00457000 C:\WINDOWS\System32\PresentationHost.exe
ModLoad: 7c900000 7c9b0000 C:\WINDOWS\system32\ntdll.dll
ModLoad: 7c800000 7c8f5000 C:\WINDOWS\system32\kernel32.dll
ModLoad: 77dd0000 77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
ModLoad: 77e70000 77f02000 C:\WINDOWS\system32\RPCRT4.dll
ModLoad: 77fe0000 77ff1000 C:\WINDOWS\system32\Secur32.dll
ModLoad: 7e410000 7e4a0000 C:\WINDOWS\system32\USER32.dll
ModLoad: 77f10000 77f57000 C:\WINDOWS\system32\GDI32.dll
ModLoad: 77c10000 77c68000 C:\WINDOWS\system32\msvcrt.dll
ModLoad: 774e0000 7761d000 C:\WINDOWS\system32\ole32.dll
ModLoad: 7c9c0000 7d1d6000 C:\WINDOWS\system32\SHELL32.dll
ModLoad: 77f60000 77fd6000 C:\WINDOWS\system32\SHLWAPI.dll
ModLoad: 42cf0000 42e14000 C:\WINDOWS\system32\urlmon.dll
ModLoad: 77120000 771ab000 C:\WINDOWS\system32\OLEAUT32.dll
ModLoad: 42990000 429d5000 C:\WINDOWS\system32\iertutil.dll
ModLoad: 79000000 79046000 C:\WINDOWS\System32\mscoree.dll
ModLoad: 42c10000 42cdf000 C:\WINDOWS\system32\WININET.dll
ModLoad: 00270000 00279000 C:\WINDOWS\system32\Normaliz.dll
ModLoad: 76390000 763ad000 C:\WINDOWS\system32\IMM32.DLL
ModLoad: 629c0000 629c9000 C:\WINDOWS\System32\LPK.DLL
ModLoad: 74d90000 74dfb000 C:\WINDOWS\System32\USP10.dll
ModLoad: 773d0000 774d3000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
ModLoad: 5ad70000 5ada8000 C:\WINDOWS\System32\uxtheme.dll
ModLoad: 76fd0000 7704f000 C:\WINDOWS\System32\CLBCATQ.DLL
ModLoad: 77050000 77115000 C:\WINDOWS\System32\COMRes.dll
ModLoad: 77c00000 77c08000 C:\WINDOWS\system32\VERSION.dll
ModLoad: 20000000 202c5000 C:\WINDOWS\System32\xpsp2res.dll
(92c.1484): Break instruction exception - code 80000003 (first chance)
eax=7ffde000 ebx=00000001 ecx=00000002 edx=00000003 esi=00000004 edi=00000005
eip=7c901230 esp=00c1ffcc ebp=00c1fff4 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=0038 gs=0000 efl=00000246
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\system32\ntdll.dll -
ntdll!DbgBreakPoint:
7c901230 cc int 3
0:005> g
ModLoad: 71ab0000 71ac7000 C:\WINDOWS\System32\ws2_32.dll
ModLoad: 71aa0000 71aa8000 C:\WINDOWS\System32\WS2HELP.dll
ModLoad: 71a50000 71a8f000 C:\WINDOWS\system32\mswsock.dll
ModLoad: 662b0000 66308000 C:\WINDOWS\System32\hnetcfg.dll
ModLoad: 71a90000 71a98000 C:\WINDOWS\System32\wshtcpip.dll
ModLoad: 76ee0000 76f1c000 C:\WINDOWS\System32\RASAPI32.dll
ModLoad: 76e90000 76ea2000 C:\WINDOWS\System32\rasman.dll
ModLoad: 5b860000 5b8b4000 C:\WINDOWS\system32\NETAPI32.dll
ModLoad: 76eb0000 76edf000 C:\WINDOWS\System32\TAPI32.dll
ModLoad: 76e80000 76e8e000 C:\WINDOWS\System32\rtutils.dll
ModLoad: 76b40000 76b6d000 C:\WINDOWS\System32\WINMM.dll
ModLoad: 769c0000 76a73000 C:\WINDOWS\system32\USERENV.dll
ModLoad: 77c70000 77c93000 C:\WINDOWS\system32\msv1_0.dll
ModLoad: 76d60000 76d79000 C:\WINDOWS\System32\iphlpapi.dll
ModLoad: 722b0000 722b5000 C:\WINDOWS\System32\sensapi.dll
ModLoad: 76fc0000 76fc6000 C:\WINDOWS\System32\rasadhlp.dll
ModLoad: 76f20000 76f47000 C:\WINDOWS\System32\DNSAPI.dll
ModLoad: 434c0000 43523000 C:\WINDOWS\system32\iedkcs32.dll
ModLoad: 76b20000 76b31000 C:\WINDOWS\System32\ATL.DLL
ModLoad: 77920000 77a13000 C:\WINDOWS\System32\SETUPAPI.dll
ModLoad: 76780000 76789000 C:\WINDOWS\System32\SHFOLDER.dll
ModLoad: 42b80000 42b8a000 C:\WINDOWS\system32\jsproxy.dll
ModLoad: 63380000 633f8000 C:\WINDOWS\system32\jscript.dll
ModLoad: 76fb0000 76fb8000 C:\WINDOWS\System32\winrnr.dll
ModLoad: 76f60000 76f8c000 C:\WINDOWS\system32\WLDAP32.dll
ModLoad: 71f80000 71f84000 C:\WINDOWS\System32\security.dll
ModLoad: 60510000 60529000 C:\WINDOWS\System32\dfshim.dll
ModLoad: 604f0000 60500000 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\dfdll.dll
ModLoad: 78130000 781cb000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\MSVCR80.dll
ModLoad: 79e70000 7a3ff000 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
ModLoad: 535d0000 535f0000 C:\WINDOWS\Microsoft.Net\Framework\v3.0\WPF\PresentationHostDLL.dll
ModLoad: 790c0000 79bf6000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\32e6f703c114f3a971cbe706586e3655\mscorlib.ni.dll
ModLoad: 7a440000 7ac2a000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\ba0e3a22211ba7343e0116b051f2965a\System.ni.dll
ModLoad: 56d30000 57072000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\WindowsBase\0703021437c2ec71213a6b701771be86\WindowsBase.ni.dll
ModLoad: 538a0000 544a2000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationCore\011f8e31d197b4ccb6a61c2267a38e5c\PresentationCore.ni.dll
ModLoad: 55270000 560cc000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationFramewo#\60421dda88800b14dc101ed9dca422fe\PresentationFramework.ni.dll
ModLoad: 55220000 5522c000 PresentationCFFRasterizer.dll
ModLoad: 56cb0000 56cc8000 UIAutomationTypes.dll
ModLoad: 56c60000 56c6c000 UIAutomationProvider.dll
ModLoad: 544f0000 54547000 System.Printing.dll
ModLoad: 56390000 5646e000 PresentationUI.dll
ModLoad: 56580000 56604000 ReachFramework.dll
ModLoad: 755c0000 755ee000 C:\WINDOWS\system32\msctfime.ime
ModLoad: 745e0000 748a6000 C:\WINDOWS\System32\msi.dll
ModLoad: 71d40000 71d5c000 C:\WINDOWS\system32\actxprxy.dll
ModLoad: 75e90000 75f40000 C:\WINDOWS\System32\SXS.DLL
ModLoad: 53630000 5363a000 C:\WINDOWS\system32\PresentationHostProxy.dll
ModLoad: 61930000 6197a000 C:\Program Files\Internet Explorer\ieproxy.dll
ModLoad: 034b0000 034b6000 C:\WINDOWS\system32\ctagent.dll
ModLoad: 637a0000 63d28000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Xml\c98cb65a79cfccb44ea727ebe4593ede\System.Xml.ni.dll
(92c.174c): CLR exception - code e0434f4d (first chance)
ModLoad: 64890000 6498c000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Configuration\eee9b48577689e92db5a7b5c5de98d9b\System.Configuration.ni.dll
ModLoad: 56390000 56588000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationUI\6d2716a55eb8ce6fc4cbf83f3ab329e3\PresentationUI.ni.dll
ModLoad: 6a320000 6a4dc000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Deployment\c7dea4895e1fa33d65e448c03de48d26\System.Deployment.ni.dll
ModLoad: 0ffd0000 0fff8000 C:\WINDOWS\System32\rsaenh.dll
ModLoad: 60340000 60348000 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\culture.dll
ModLoad: 5e620000 5e87a000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\Microsoft.JScript\b3b62fe820b416515420a6ec17b247c3\Microsoft.JScript.ni.dll
ModLoad: 5e1b0000 5e1cc000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\Microsoft.Vsa\e674ba75a514e00b26329e212da938e0\Microsoft.Vsa.ni.dll
(92c.1094): CLR exception - code e0434f4d (first chance)
(92c.1094): CLR exception - code e0434f4d (first chance)
ModLoad: 53190000 53377000 C:\WINDOWS\System32\MilCore.dll
ModLoad: 76bf0000 76bfb000 C:\WINDOWS\System32\PSAPI.DLL
ModLoad: 4fdd0000 4ff76000 C:\WINDOWS\System32\d3d9.dll
ModLoad: 6d990000 6d996000 C:\WINDOWS\System32\d3d8thk.dll
ModLoad: 53000000 530b4000 C:\WINDOWS\System32\WindowsCodecs.dll
ModLoad: 67920000 679d6000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Security\2b5994269cc5b996231c9b21afea9a91\System.Security.ni.dll
(92c.174c): C++ EH exception - code e06d7363 (first chance)
(92c.174c): C++ EH exception - code e06d7363 (first chance)
(92c.174c): C++ EH exception - code e06d7363 (first chance)
(92c.174c): CLR exception - code e0434f4d (first chance)
ModLoad: 561b0000 561f2000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationFramewo#\9df61ec7aad39fe0bac82139cd84e5e5\PresentationFramework.Classic.ni.dll
ModLoad: 77a80000 77b14000 C:\WINDOWS\system32\CRYPT32.dll
ModLoad: 77b20000 77b32000 C:\WINDOWS\system32\MSASN1.dll
ModLoad: 75e60000 75e73000 C:\WINDOWS\System32\cryptnet.dll
ModLoad: 4d4f0000 4d548000 C:\WINDOWS\System32\WINHTTP.dll
ModLoad: 77b90000 77bc2000 C:\WINDOWS\System32\certcli.dll
ModLoad: 754d0000 75550000 C:\WINDOWS\system32\CRYPTUI.dll
ModLoad: 76c30000 76c5e000 C:\WINDOWS\system32\WINTRUST.dll
ModLoad: 76c90000 76cb8000 C:\WINDOWS\system32\IMAGEHLP.dll
ModLoad: 74e30000 74e9c000 C:\WINDOWS\System32\RichEd20.dll
ModLoad: 767a0000 767b3000 C:\WINDOWS\System32\NTDSAPI.DLL
ModLoad: 71cf0000 71d3b000 C:\WINDOWS\system32\kerberos.dll
ModLoad: 76790000 7679c000 C:\WINDOWS\System32\cryptdll.dll
ModLoad: 7ade0000 7af7c000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Drawing\0e83aac37b2623f1a24c70979f31dd56\System.Drawing.ni.dll
ModLoad: 536d0000 53790000 C:\WINDOWS\System32\PresentationNative_v0300.dll
(92c.174c): CLR exception - code e0434f4d (first chance)
ModLoad: 79060000 790b6000 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll
(92c.174c): C++ EH exception - code e06d7363 (first chance)
(92c.174c): C++ EH exception - code e06d7363 (first chance)
(92c.174c): C++ EH exception - code e06d7363 (first chance)
(92c.174c): CLR exception - code e0434f4d (first chance)
ModLoad: 4fdd0000 4ff76000 C:\WINDOWS\System32\d3d9.dll
ModLoad: 6d990000 6d996000 C:\WINDOWS\System32\d3d8thk.dll
ModLoad: 56100000 56166000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationFramewo#\36c6cfd5d4e80d5c548f823b2bbf5457\PresentationFramework.Aero.ni.dll
(92c.174c): CLR exception - code e0434f4d (first chance)
(92c.174c): CLR exception - code e0434f4d (first chance)
(92c.174c): C++ EH exception - code e06d7363 (first chance)
(92c.174c): C++ EH exception - code e06d7363 (first chance)
ModLoad: 03f80000 03fcb000 C:\WINDOWS\System32\msctf.dll
(92c.174c): C++ EH exception - code e06d7363 (first chance)
(92c.174c): CLR exception - code e0434f4d (first chance)
(92c.174c): CLR exception - code e0434f4d (first chance)
(92c.174c): CLR exception - code e0434f4d (first chance)
(92c.174c): CLR exception - code e0434f4d (first chance)
(92c.174c): CLR exception - code e0434f4d (first chance)
(92c.174c): CLR exception - code e0434f4d (first chance)
(92c.174c): CLR exception - code e0434f4d (first chance)
(92c.174c): CLR exception - code e0434f4d (first chance)
(92c.174c): CLR exception - code e0434f4d (first chance)
(92c.174c): CLR exception - code e0434f4d (first chance)
ModLoad: 5e3a0000 5e42d000 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\diasymreader.dll
(92c.174c): CLR exception - code e0434f4d (first chance)
(92c.174c): CLR exception - code e0434f4d (!!! second chance !!!)
eax=0006f4ac ebx=e0434f4d ecx=00000000 edx=00000029 esi=0006f538 edi=000f0ab0
eip=7c812a5b esp=0006f4a8 ebp=0006f4fc iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\system32\kernel32.dll -
kernel32!RaiseException+0x52:
7c812a5b 5e pop esi




Re: Windows Presentation Foundation (WPF) XBAPs and Loose XAML does not work on corporate PCs

Chango V. - MSFT

Unfortunately, this debugger log hardly gives us any new information. The DLL is loaded. Most likely its initialization (call to DllMain()) fails. Some additional information may help:

  1. The call stack where the first-chance CLR exception is thrown just after loading msctf.dll. The easiest way to get this:
    1. Before letting the process run the first time, enter two debugger commands: '.symfix' and 'sxe ld:msctf' [without the quote chars]. The first one points the debugger to Microsoft's public symbol server. The second one tell it to break on loading our DLL of interest.
    2. Let the process run ('g').
    3. When the debugger breaks after loading msctf.dll, enter 'sxe clr' command . This request a break first-chance CLR exception. Run again.
    4. Debugger will break when the CLR exception is thrown. At this point we can get a native callstack or managed callstack. Either one could be more useful, so please post the one that looks more meaningful to you.
      • Native: 'kp 40' (to request 40 frames with parameters)
      • Managed: First do '.loadby sos mscorwks' and then '!clrstack'.
  1. Process Monitor log, as I described previously. You could either put it on a web server where we could get it from or email it to me.





Re: Windows Presentation Foundation (WPF) XBAPs and Loose XAML does not work on corporate PCs

Frank Racis

I'm having a similar problem viewing XPS files. I'm running XP SP2, logged on as an administrator, and this is a corporate-imaged PC with the "CATPC" tool. The stack trace and MSCTF errors are the same, and disabling text services fixes the problem.

To debug this, I ran "XPSViewer -embedding" from the command line. This immediately launches a second XPSViewer.exe with a restricted token (no Administrator rights) and exits. I attached WinDBG to the second process, then double-clicked an XPS file in the desktop.

I was able to find out exactly where the initialization is failing:

MSCTF!CCicFileMappingStatic::Create+0x1c:
747238b1 ff15ec107274 call dword ptr [MSCTF!_imp__CreateFileMappingA (747210ec)]
              ds:0023:747210ec={kernel32!CreateFileMappingA (7c80945c)}
0:000> k
ChildEBP RetAddr 
0006e90c 7472385e MSCTF!CCicFileMappingStatic::Create+0x1c
0006ea30 7472333d MSCTF!CCiceroSharedMem:: Start+0x51
0006eb4c 74723185 MSCTF!ProcessAttach+0x18b
0006eb5c 747213ed MSCTF!DllMain+0x39
0006eb7c 7c9011a7 MSCTF!_DllMainCRTStartup+0x52
0006eb9c 7c91cbab ntdll!LdrpCallInitRoutine+0x14
0006eca4 7c916178 ntdll!LdrpRunInitializeRoutines+0x344
0006ef50 7c9162da ntdll!LdrpLoadDll+0x3e5
0006f1f8 7c801bb9 ntdll!LdrLoadDll+0x230
0006f260 10106850 kernel32!LoadLibraryExW+0x18e

This call is trying to open the shared memory object CiceroSharedMemDefaultS-[sid] It returns NULL with error 5 (access denied).

Looking at the Cicero object with WinObj, access is granted only to Administrators and SYSTEM. Because XPSViewer is now running without administrator rights, MSCTF can't open this shared memory. This causes the DLL initialization to fail.

I was able to get it to work by preventing the host from relaunching as a restricted user. Open the registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\Windows Presentation Foundation\Hosting

and create a new DWORD value RunUnrestricted with a value of 1.

This key prevents XPSViewer from relaunching itself without administrator rights. With the proper rights, MSCTF can open the shared memory block and everything works correctly.

/Frank





Re: Windows Presentation Foundation (WPF) XBAPs and Loose XAML does not work on corporate PCs

Chango V. - MSFT

Frank, that's a real breakthrough!
Now the remaining challenge is to figure out why the memory section has the wrong permissions. On an unaffected computer, the particular interactive user (which would be Administrator in your case) and SYSTEM have access to the named memory section. This OS imaging tool is a possible suspect, but I don't know anything about it, and I don't have a good theory yet. (Granted, PresentationHost.exe falls in the very rare group of applications that run with this kind of stripped process token, so no surprise that everything else seems normal.)
Please check a few more things:
  • Under what account are explorer.exe and ctfmon.exe running
  • User Process Explorer from sysinternals.com to see in which processes the memory section is open. (Do handle search - Ctrl+F and enter the static part of the section name.) Is there only a single section with that name prefix (and always same SID) Examine the permissions for the section in a few processes (context menu > Properties > Security). Are they all the same
  • Kill *all* processes that have the memory section shared in them (incl. ProcMon). Press Alt+Ctrl+Del to start Task Manager and from the File menu run Explorer. Does this change the permissions for the named section in ctfmon.exe (Explorer should start ctfmon.exe.)
  • Create another local administrator account and see whether the problem still exists.
I'm sure you get the sense of what I'm trying to get at, but I'll admit it's still mostly shooting in the dark. I hope to get an extra clue from doing the above experiments.
Thank you very much for your cooperation.

Btw, we are hiring! ;-)





Re: Windows Presentation Foundation (WPF) XBAPs and Loose XAML does not work on corporate PCs

Frank Racis

I found the root cause of the problem.

When MSCTF creates the section, it's passing in a NULL for the security descriptor, which will inherit the default ACL from the process token. This can be viewed from the security/permissions button in process explorer. Here's where things are different:
  • On the problem PC, the token has an ACL for "SYSTEM" and "Adminstrators"
  • On a "clean" XP machine, the token has an ACL for "SYSTEM" and "MyUserName" even though "MyUserName" is an administrator.
It turns out that the default ACL is controlled via security policy:
http://support.microsoft.com/kb/318825

On the problem machine, this is being set to "Administrators" by domain policy, instead of the default of "Object Creator" When XpsViewer is launched without the adminstrators group, it's denied access, since rights are given only to the Administrators group and not the userid itself.

It looks like the problem will be limited to XP - on Server 2003, MSCTF is passing in an explicit security descriptor instead of NULL, which gives an ACL of Administrators, MyUserName, RESTRICTED, and SYSTEM.

Simple, right

/Frank







Re: Windows Presentation Foundation (WPF) XBAPs and Loose XAML does not work on corporate PCs

purpleflash

Ah yes, CAT PC... yup we have 'em all over the office

Fortunately my WPF apps run fine on 'em... at least so far.

Have not tried running any of them as XBAPs though...




Re: Windows Presentation Foundation (WPF) XBAPs and Loose XAML does not work on corporate PCs

Chango V. - MSFT

Frank, you really nailed it down! :-)
It's unfortunate how this security policy throws things off. Do you know whether it's used on purpose in your environment or perhaps this OS imaging tool has decided to change the default Hopefully, you'll be able to switch to the default object owner setting as a workaround.
We'll somehow deal with the problem, but it seems rather nasty.
Will you please contact me by email I'd like to get a couple more piece of information.
Thanks.