Posts

Showing posts from September, 2014

Query the CMDB with PowerShell

Image
With XIA Configuration Server version 6.2 we're now directly supporting the use of PowerShell to query the CMDB. The following very simple example generates a PDF document for an item and opens the file in the default PDF document viewer. In the example the PDF is generated for the item with ID 1031, however any valid item ID may be used.  The output is returned from the server as a byte[] array, this is then saved to the filesystem before opening. In the example the file is saved to "c:\temp\sample.pdf", however any valid path may be used.  Code Sample Write-Host "Getting PDF data..." $filename = "c:\temp\sample.pdf" $binaryData = $xia . GET_PDFOutputBasic( 1031 ) [ IO.File ]:: WriteAllBytes( $filename , $binaryData ) [ System.Diagnostics.Process ]:: Start( $filename )  Output For more information see the PowerShell page of our web site http://www.centrel-solutions.com/XIAConfiguration/features.aspx?feature=PowerS...

Viewstate of a DropDownList is lost on postback using ComponentArt Dialog Control

As long time users of ComponentArt ASP.NET controls we're well aware of their shortcomings and the company's lack of enthusiasm about fixing bugs. We've recently had a problem with populating data into a dropdown list that's inside a ComponentArt Dialog Control on the initial load of a page. The dropdown list is populated but on subsequent postbacks the information is lost and viewstate errors may be seen. Here is the forum page where there are a lot of complaints but no viable solution. http://www.componentart.com/community/forums/t/37374.aspx This is really not acceptable because this is the kind of problem that really stops your development in its tracks. We do however have a simple solution. The problem seems to be related to the control lifecycle internal to the ComponentArt controls. You can resolve the issue by populating the dropdown list (or other problematic control) by overriding a different method. OnLoad - fail OnInit - fail OnPreRender - work...

A "Generic failure" error is seen accessing DNS WMI classes such as "MicrosoftDNS_Zone"

Image
You may see a " Generic failure " error when trying to access DNS WMI classes in the root\MicrosoftDNS namespace such as "MicrosoftDNS_Zone". In the XIA Configuration Client the error displayed is for example The DNS service agent encountered an exception when 'Reading forward lookup zones'. Generic failure. Cause This problem can be caused by a problem with the DNS WMI provider.  Resolution Ensure you have a full backup of the server Open a command prompt as an Administrator  Enter the following command changing the drive letter and path if required C:\Windows\System32\wbem\mofcomp C:\Windows\System32\wbem\dnsprov.mof Scan the DNS service again For more information on the mofcomp utility please see the following Microsoft web page. http://msdn.microsoft.com/en-us/library/aa392389(v=vs.85).aspx