"Input string was not in a correct format" starting profiler

I am trying to use ANTS Performance Profiler version to profile an ASP.NET application hosted in IIS 6 on a Windows Server 2003 R2 SP2 machine.

Upon starting Profiler I get the following error message immediately after profiling begins:

Unexpected error ocurred during profiling:
Input string was not in a correct format.

The following stack dump is generated:

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.CounterExists(String category, String counter, Boolean& categoryExists)
at System.Diagnostics.PerformanceCounterLib.CounterExists(String machine, String category, String counter)
at System.Diagnostics.PerformanceCounter.Initialize()
at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, String instanceName, Boolean readOnly)
at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, Boolean readOnly)
at RedGate.Profiler.Monitoring.PerformanceCounterFactory.CreatePerformanceDataAdapter(String instanceName, PerformanceCounterInfo info, Int32 processID, PerformanceCounterLog log, UpdateTimer timer)
at RedGate.Profiler.Session.SessionPerformanceCounterData.StartProfiling(Int32 processID)
at RedGate.Profiler.Session.ProfilerSession.m()
at RedGate.Profiler.Session.ProfilerSession.a(Object , ConnectedEventArgs )
at bI.a(ConnectedEventArgs )
at bI.OnConnected(h newLog)
at be.c(bc , bf )
at be.a(bc , bf )

Any ideas what could be causing this?


  • Hi,

    could you do me favour - write out and post which performance counters you have currently selected to be recorded when profiling.

    It appears that perhaps an additional Performance Counter has been selected which is now causing an issue.

    Tracking down which one might be a little time consuming if you have added lots of extra ones but try with the bare minimum first and see if the problem is resolved this way.


  • Thanks for your fast reply! After reading your message it ocurred to me that this started after I turned on the IIS performance counters. Previous to that I had only:

    IO Read bytes per second
    IO Write bytes per second
    Processor % Processor time

    The issue began when I turned on all of the IIS counters. Removing these counters I do not get the error, though I can reproduce it reliably by adding them back. I have not tried to isolate which counter or which combination of counters is the root cause.

    Is it not advisable to use multiple types of counters at the same time or is there documentation outlining recommendations of which counters can safely be used in conjunction with one another?

    Thanks again for the reply. For the time being I will stick with the basic IO and processor time counters.
  • There in theory shouldn't be an issue here with adding the other counters.

    If you narrow it down to just one in particular or if it's just a case of any other counter of that type being added causes the problem then it would be great if you could post and let me know.

    We will look into this further and hope the rest of the profiling goes well.

    There are some videos available here which show various things to get you started if it's the first time you are using it:

    http://www.red-gate.com/products/ants_p ... /video.htm


Sign In or Register to comment.