Exception When Profiling Windows Service

I get the following exception when trying to memory profile a .Net Windows Service. The exception is generated when I select the .Net Windows service radio button and click Next:

System.NotSupportedException: The given path's format is not supported.
at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath)
at System.Security.Util.StringExpressionSet.AddExpressions(String[] str, Boolean checkForDuplicates, Boolean needFullPath)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.Path.GetFullPath(String path)
at _70._3(String )
at _70._1(String , String& )
at _57._1(Boolean )
at _48._5()
at _48._1(Object , WizardPageCancelEventArgs )
at ActiproSoftware.Wizard.WizardPageCancelEventHandler.Invoke(Object sender, WizardPageCancelEventArgs e)
at ActiproSoftware.Wizard.Wizard.OnSelectionChanging(WizardPageCancelEventArgs e)
at ActiproSoftware.Wizard.Wizard._1(WizardPage , Boolean , Boolean , WizardPageEventReason )
at ActiproSoftware.Wizard.Wizard._2(WizardPageCancelEventArgs )
at ActiproSoftware.Wizard.Wizard._1(CommandEventArgs )
at ActiproSoftware.Wizard.Wizard.RaiseCommand(Command command)
at _9.OnClick(EventArgs e)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I recently upgraded to 2.6. I have already tried removing 2.6 and reinstalling it from scratch (rather than upgrading the 2.0 version which I had done previously).

I am running XP SP2 and have the following .net frameworks installed:

Anyone have any ideas what is going on?



  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello Stewart,

    When you select the option to profile a .NET service, the first thing that happens is that ANTS Profiler goes through the registry to find every service that's installed and see if the service is a .NET service. There could be a few possibilities:

    A service is installed, but the executable for the service had been deleted
    you do not have access to the path.

    Maybe it would help if you restart the box and check the system log to see what services do not start successfully? That could possibly point out the service that is incorrectly installed.

    Please let us know what you find.
  • Brian DonahueBrian Donahue Posts: 6,590 New member

    ANTS Profiler gets the list of services from the CurrentControlSet in the registry, but it then needs to open the file to check that it is a .NET managed-code executable. If the service had been installed by and administrator, your user account may not have read access to the file and this causes problems for ANTS Profiler.

    You'll need to make sure that you can read the file indicated in the Service properties sheet's path to executable property.
This discussion has been closed.