Posts

Configuration Management Database (CMDB) Search

Image
With XIA Configuration Server version 6.2 searching the configuration management database has become easier and faster. The new search interface is integrated directly into the toolbar. Select a location, container, customer or item type to focus the search The search results are now integrated into the grid, allowing all the functionality you expect when browsing the CMDB. For more information on the XIA Configuration Server search capability see the following Search Feature Page .

C# Dynamic Plugin Code

Image
With XIA Configuration Server it is now possible to create Dynamic Agent Plugins using the Dynamic Code Editor . This makes it easy to extend the agent capabilities of each agent using standard VB.NET or C#.NET code. For more information see the following page - Extend CMDB with Dynamic Plugins  on our site.

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

Setting the Windows 8.1 or Server 2012 titlebar color using the registry

Image
I've recently had a problem whereby I needed to set the title bar colour in Windows 8.1 (or Windows Server 2012) to a specific colour so that I could take screenshots for our technical documentation. To ensure consistency we wanted to keep the titlebars the same colour in all our documentation. The problem here is I can get the RGB of the colour I need however you're not allowed to key a colour in using the new interface. Instead you're are left working some kind of colour wizardry moving the sliders around for several minutes. After a small amount of messing around I found the following registry keys in combination allow you to enter the RGB in hex format after the mystical d9  (not sure what this symbolises). [HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM] "ColorizationColor"=dword:d9 6badf6 "ColorizationColorBalance"=dword:00000064 "ColorizationAfterglow"=dword:d9000000 "ColorizationAfterglowBalance"=dword:00000...

Writing Chinese or other extended characters to CSV using C#.NET is garbled when viewed in Microsoft Excel

Image
We've recently had a problem when writing Chinese or other extended characters to CSV using C#.NET is garbled when viewed in Microsoft Excel. Firstly as you would expect if you use the standard ASCII encoding when using File.WriteAllText() method the Chinese characters are substituted for ???? You can work around this by overloading with the encoding parameter and using UTF8 encoding. File.WriteAllText(Filename, "Some,Sample,这是一些示例文本 这是一些示例文本 这是一些示例文本, Data", Encoding.UTF8); NOTE: if you use Unicode encoding the following may happen where Excel does not recognize the commas as delimiters. If you're trying to write the CSV data to binary you will have another problem whereby the Chinese characters are garbled. To resolve this issue you should use the GetPreamble() method to write the encoding to the start of the file. The file will now open correctly in Excel using the following sample code. private void WriteCSV() {     byte[] CSVBinaryDa...