Feed Subscribe
Exception has been thrown by the target of an invocation.

Input string was not in a correct format when installing SQL Server 2008 with Reporting Services

by ondrejsv 5. October 2009 16:37

I’ve got a fresh Windows 7 copy on my notebook so reinstallation of all applications is a necessary evil. Microsoft SQL Server 2008 proved to be the most evil one.

After starting good old setup.exe I learned from a message box that this program is incompatible with Windows 7 and I must apply SP1 after installation. OK, I selected all features to install without any hesitation, Reporting Services including. Suddenly in the middle of the installation, an “Input string was not in a correct format” popped out at me but the installation was not rolled back and seemed to finish successfully.

Then I wanted to apply SP1 but I couldn’t because the SP1 detected a problem in a previous installation and refused any other work until I resolve it.

A quick look in the log file (C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\DATE_OF_YOUR_INSTALL\Detail.txt):

2009-10-05 10:13:43 RS: System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Int32.Parse(String s, IFormatProvider provider)
at System.Diagnostics.PerformanceCounterLib.GetStringTable(Boolean isHelp)
at System.Diagnostics.PerformanceCounterLib.get_NameTable()
at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
at System.Diagnostics.PerformanceCounterLib.CategoryExists(String machine, String category)
at System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName, String machineName)
at System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName)
at Microsoft.ReportingServices.Common.RSPerfCounterInstallUtil.Uninstall()
at Microsoft.SqlServer.Configuration.RSExtension.RSPerfCounterUtil.SetPerfCounters()
at Microsoft.SqlServer.Configuration.RSExtension.SQLRSConfigurationPrivate.Install_ConfigRC(Dictionary`2 actionData, PublicConfigurationBase spcb)
2009-10-05 10:13:43 Slp: Configuration action failed for feature RS_Server_Adv during timing ConfigRC and scenario ConfigRC.

Indeed, a problem with my performance counters. Start-run-perfmon and a message box that some of my counters could not be loaded.

First I wanted to sacrifice Reporting Services as I don’t really need them. But I was in a trap: removal failed with the exactly same message (input string…).

I searched the Internet and found a simple command to rebuild performance counters: “lodctr /R”. Just be sure to run it as administrator otherwise it would claim “Error 5”.

And voila – Reporting Services are uninstalled and SP1 installed. :-) (And I believe that you can install the RS now if you want)


Connectors of Visio n-ary association cannot be right-angled

by ondrejsv 16. September 2009 12:59

This is my very first complaint on my blog but I cannot resist posting. I know that Microsoft Visio is not so popular tool when it comes to UML modeling (though for some diagramming is very useful). Nevertheless I think that its UML stencil could be little bit more friendly.

Today I wanted to draw an n-ary association on a complex diagram. To my surprise I found out that its connectors cannot be made right-angled as connectors of classical binary associations. You must even rotate the diamond shape to position them correctly. However you cannot freely move the role labels. The result is really ugly (I left only relevant shapes on the picture):


I wanted to edit the built-in shape but it’s so complicated (not even mentioning to make it work with Visio UML add-on) that I gave up.

You can instead place an ordinary diamond symbol and connect it by connectors with your classes but the association it represents won’t be stored in your model, of course.

This is how it should look (drawn in the Sparx Enterprise Architect):



My fight with Windows Live Writer Installer

by ondrejsv 19. December 2007 13:46

First time I tried Windows Live Writer a few months ago when I was experimenting with BlogEngine.NET. I found the tool to be quite useful for writing blog posts offline so when I finally created my own blog I immediately downloaded the installer in order to start writing on my notebook. Everything seemed to be fine until the progress bar captioned "checking your computer for Windows Live programs" changed to "Sorry, this is taking a little longer than expected". I was really patient but as I don't see a half an hour as little longer I killed the installer and began investigating.


During the installation I was looking what processes were active and so I found out that Windows Live Writer Installer actually uses Windows Update to download files and install them. Windows Update logs its activity to WindowsUpdate.log file which you can find in your Windows base directory. It may be fairly big in size so try to open it in something smarter than Notepad (like Ultraedit or Notepad++ in which it does not take forever). Surely, it was full of errors:

WARNING: WinHttp: ShouldFileBeDownloaded failed with 0x80072efd

WARNING: SyncServerUpdatesInternal failed: 0x8024402f

Obviously WinHttp component couldn't download any files. The error codes represent general errors like connection timeout and there was an error while downloading files and looking for them gave me at first only general advices as well (check you are connected to internet and so on). I tried to shut down the firewall and even my antivirus software and rerun the installation but no result. As I use a proxy server to connect to the outside world I suspected Windows Update service for a while that it does not use it. A little more searching and I found a blog post describing one useful utility -- proxycfg.exe -- used to manage WinHTTP proxy settings which, as I learnt, are completely independent from IE settings (UPDATE 2007-12-27: See also the update section below how to configure proxy without proxycfg in Windows Vista). Indeed (and fortunately) when I run it, it showed me that WinHTTP had no proxy information and was trying to connect to internet directly:


By running proxycfg -u the utility imported my proxy settings from Internet Explorer:


After restart I was happy to complete the Windows Live Writer Installer:


Note: If you are curious, I found the rules Windows Update service uses to decide which proxy server to use.

Note 2: I couldn't find proxycfg utility on my Vista notebook, so I copied it from a Windows Server 2003 machine (look for it in the windows\system32 directory).

Note 3: In the past whenever Microsoft used an online installer, it used to offer also a completely offline installation package as well. If it was true in this case, I could possibly save almost two hours of investigating and trying to install Windows Live Writer.

UPDATE (2007-12-27): I learnt today that proxycfg utility has been displaced in Windows Vista and we should use the netsh utility to configure any proxy settings. Here is how the above mentioned procedure would look when done in netsh:

Run cmd.exe under administrator privileges and type netsh and then winhttp to enter WinHTTP context:


By issuing show proxy command you would see your current proxy settings (direct connection, indeed) and by import proxy ie you import settings from IE:


You may find more information in this Windows Core Networking blog post.