Показать сообщение отдельно
Старый 27.09.2012, 05:20   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
emeadaxsupport: AX 2012 Print destination settings dialog does not show up due to WMI error
Источник: http://blogs.msdn.com/b/axsupport/ar...wmi-error.aspx
==============

I recently come across a case where printer destination settings dialog typically used by report to select print destination does not show up.

The cause we found is that an exception occurs when AX client queries existing printer from hosted machine. The code is from Forms\SRSPrintDestinationSettingsForm\printerMap() at line 30 which is a call to external DLL to query WMI for all printers in the machine. The exception is thrown so the rest of the code thereafter is not executed resulting in the dialog not shown.

You could use try/catch block like below at Forms\SRSPrintDestinationSettingsForm\printerMap() at line 30 to log more information of the exception thrown from the CLR call with variable of System.Exception ex declared.



The exception is “not found” that indicates WMI library could not revert back with printer list. What AX does is to send "Select * from Win32_Printer" to WMI so wbemtest could also be used to detected the error or to verify using the steps in below.
  1. Start->Run->Wbemtest.exe
  2. Click “Connect…” on the Windows Management Instrumentation Tester dialog box
  3. Click “Connect” on the Connect dialog box
  4. Click “Query” button and then type in “select * from Win32_Printer” and click Apply
  5. Send us the Query Result dialog box with printer lists or if it errors out


I eventually works with an window support engineer to rebuild WMI that You may want to do the same by discussing with your system admin. and/or window support engineer. Below is the step we use to rebuild WMI which addresses the print destination setting not shown error for your information.
  1. Change startup type to Window Management Instrumentation (WMI) Service to disabled
  2. Stop the WMI Service; you may need to stop IP Helper Service first or other dependent services before it allows you to stop WMI Service
  3. Make a copy of the repository folder: C:\WINDOWS\system32\wbem\Repository
  4. run from elevated command prompt:
Winmgmt /salvagerepository






Источник: http://blogs.msdn.com/b/axsupport/ar...wmi-error.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.