SecurityException when selecting .NET Windows Service option

DecorumDecorum Posts: 10 Bronze 2
Hello,

I am trying to performance profile a .NET Windows Service. When I select the .NET Windows Service radio button in the Profiler Project Wizard and click Next, an unhandled SecurityException occurs (see below for the entire exception message).

The service is a VB.NET service built in VS2005, started as a domain account without admin rights on the local machine (not that this matters, since I can't even reach the point where a specific service is selected). The service was installed by running installutil.exe on it. I am running Windows Vista Ultimate x86 RTM and ANTS Profiler 2.7.1.20.

Here's what I've already tried:
- Made sure ANTS is running with Admin rights.
- Made sure ANTS is running in the My Computer zone.
- Made sure the My Computer zone has Full Trust.
- Restarted Windows.

Thankful for any help resolving this issue!

Best regards,
Daniel Stolt

Exception details:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Security.SecurityException: Requested registry access is not allowed.
at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at _71._1(String , String& )
at _58._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.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The Zone of the assembly that failed was:
MyComputer


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
RedGate.Profiler.UI
Assembly Version: 2.7.1.20
Win32 Version: 2.7.1.20
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/RedGate.Profiler.UI.exe
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
RedGate.Profiler.Engine
Assembly Version: 2.7.1.20
Win32 Version: 2.7.1.20
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/RedGate.Profiler.Engine.DLL
RedGate.Licensing.Client
Assembly Version: 1.3.0.25
Win32 Version: 1.3.0.25
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/RedGate.Licensing.Client.DLL
DevExpress.XtraBars.v6.2
Assembly Version: 6.2.4.0
Win32 Version: 6.2.4.0
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/DevExpress.XtraBars.v6.2.DLL
DevExpress.Utils.v6.2
Assembly Version: 6.2.4.0
Win32 Version: 6.2.4.0
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/DevExpress.Utils.v6.2.DLL
DevExpress.XtraTreeList.v6.2
Assembly Version: 6.2.4.0
Win32 Version: 6.2.4.0
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/DevExpress.XtraTreeList.v6.2.DLL
DevExpress.XtraEditors.v6.2
Assembly Version: 6.2.4.0
Win32 Version: 6.2.4.0
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/DevExpress.XtraEditors.v6.2.DLL
DevExpress.Data.v6.2
Assembly Version: 6.2.4.0
Win32 Version: 6.2.4.0
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/DevExpress.Data.v6.2.DLL
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
ActiproSoftware.DockableWindow
Assembly Version: 2.0.208.0
Win32 Version: 2.0.208.0
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/ActiproSoftware.DockableWindow.DLL
ActiproSoftware.TabStripPanel
Assembly Version: 2.0.208.0
Win32 Version: 2.0.208.0
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/ActiproSoftware.TabStripPanel.DLL
RedGate.Licensing.Helper
Assembly Version: 1.3.0.25
Win32 Version: 1.3.0.25
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/RedGate.Licensing.Helper.DLL
DevExpress.XtraGrid.v6.2
Assembly Version: 6.2.4.0
Win32 Version: 6.2.4.0
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/DevExpress.XtraGrid.v6.2.DLL
ActiproSoftware.Wizard
Assembly Version: 3.0.113.0
Win32 Version: 3.0.113.0
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/ActiproSoftware.Wizard.DLL
ActiproSoftware.WinUICore
Assembly Version: 1.0.77.0
Win32 Version: 1.0.77.0
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/ActiproSoftware.WinUICore.DLL
ActiproSoftware.Shared
Assembly Version: 1.0.77.0
Win32 Version: 1.0.77.0
CodeBase: file:///C:/Program%20Files/Red%20Gate/ANTS%20Profiler/ActiproSoftware.Shared.DLL
System.Design
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
System.DirectoryServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.DirectoryServices/2.0.0.0__b03f5f7f11d50a3a/System.DirectoryServices.dll
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
System.ServiceProcess
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.ServiceProcess/2.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Comments

  • Hi,

    Thanks for the report - I can confirm that I see the same thing here, even with all the usual access controls set as lenient as possible.

    Because we released ANTS 2.7.1 before Vista was finalized, we weren't able to test all features at that point.

    We're aiming for full Vista support in ANTS Profiler 3, at which point obviously that problem will be resolved.

    Many thanks,
    Robert
    Robert Chipperfield
    Red Gate
  • DecorumDecorum Posts: 10 Bronze 2
    Thanks for the reply, Robert!

    Good thing you could reproduce.

    But what do you suggest I do to resolve or work around the issue? Can I create a project file on an XP machine and still open and run it an Vista?

    Also, is there any estimation as to when version 3 will be out?

    Best regards,
    Daniel Stolt
  • Hi Daniel,

    After a very quick test, it does seem that it's just the wizard that's affected. Create the project on another machine with all the correct options set in the wizard, save the project. Then open it on the Vista machine, and cancel the wizard immediately. You should then be able to just choose "start profiling" from the toolbar or menu, and it should work.

    Note that I've only tested this on a tiny service that happened to be sitting on my Vista machine, so I don't promise it will work for you, but it should do!

    Version 3 is currently planned for Q2 2007, though we don't have a more specific date at this stage.

    Thanks,
    Robert
    Robert Chipperfield
    Red Gate
  • DecorumDecorum Posts: 10 Bronze 2
    Thank you, Robert!

    I'll give this a try.

    I that doesn't work for me, I guess I'll resort to doing my profiling an another machine, or perhaps in a VMware machine.

    Best regards,
    Daniel
  • Note: there's a slight bug in that workaround. About 5 minutes after you start profiling, ANTS will pop up a message box stating "Object reference not set to instance of object" or similar.

    This didn't affect my profiling, so hopefully it should just be an irritation.

    Rob
    Robert Chipperfield
    Red Gate
Sign In or Register to comment.