Profiler won't start

I have just downloaded the 14day trial of ANTS, due to it being part of an excellent suite of SQL Tools.

But it won't start.

I get the following error:

Unable to start profiler - exception details System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Unable to cast COM object of type 'SHDocVw.InternetExplorerClass' to interface type 'System.Runtime.InteropServices.UCOMIConnectionPointContainer'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{B196B284-BAB4-101A-B69C-00AA00341D07}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at SHDocVw.DWebBrowserEvents2_EventProvider..ctor(Object )
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
at System.__ComObject.CreateEventProvider(Type t)
at System.__ComObject.GetEventProvider(Type t)
at SHDocVw.InternetExplorerClass.add_OnQuit(DWebBrowserEvents2_OnQuitEventHandler )
at _2._1()
at _2..ctor()
at _49._8()
at _49._1()
at _5._4(IAsyncResult )

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

After going through most of the forum searching on differnt parts of the error, i have re-reg'd the dll and a couple of other things. The only thing i have done is delete the ASPNET user as i can't seem to do this...no option to delete.

Would really appreciate some help on this.

What i am running:

Windows XP SP2
Visual Studio Team Edition (although i was running the profiler outside of the VS IDE)
I have a multi-tiered project...website and 3 projects...all in VB.net

Cheers for any help

Colin

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Colin,

    The problem is definitely with Internet Explorer. When you profile an ASP .NET web application, Profiler starts an instance of IE to use as a harness for you to run the ASP .NET application. It then subscribes to the onQuit event so that it will be notified if you close the browser window. At that point, Profiler will stop the current ASP .NET profiling session.

    As of version 3, Profiler tries to automatically register shdocvw for you if it fails to get a hook into the onQuit event. The problem occurs because COM Interop believes there is an interface for DWEBBrowserEvents2_EventProvider and when .NET's Interop queries the underlying COM dll, it doesn't find one. So either the Interop dll (ShDocVw.dll in the ANTS Profiler 3 directory) is incorrect, the COM interface in %systemroot%\system32\shdocvw.dll has not registered an interface for the event, or possibly one or both of these files in missing, corrupt, or you do not have access to it.
  • Ok will try the dll again tonight. If not i will uninstall it and reinstall it.

    If none of this works, any ideas of what i should do?
  • Hi Colin,

    Well, I would run a 'repair' on the ANTS Profiler installation to replace the Interop dll that we ship, then maybe consider reinstalling IE. I'm afraid I'm no expert at repairing broken installations of Internet Explorer. I'd just play this by ear. :D
  • I have delete the asp.net user, reinstalled .net to get a new clean aspnet user. I have reinstalled IE7, and then reinstalled ANTS profiler. Still no joy. Now the only thing i can think of current is that i use IIS on an XP Pro machine, but using a hack tool to have multiple websites running on IIS (although only 1 at a time!).

    Could this be the problem?
  • Set the default website to be my project but no joy what so ever. I am getting a bit upset with this as the other tools from RedGate are so easy to use and run, this seems to be such a rigmarole to get this working.

    Please someone help me :-)
  • I added the logs folder to my install directory and here is the results:

    18/11/2007 12:30:35 ANTSProfilerLog initialized
    18/11/2007 12:30:35 PID = 4000
    18/11/2007 12:30:35 Log file name = ANTSProfilerLog4000.txt
    18/11/2007 12:30:35 OS version = Microsoft Windows NT 5.1.2600 Service Pack 2
    18/11/2007 12:30:35 Machine name = BABYLON
    18/11/2007 12:30:35 User name = Colin Wiseman
    18/11/2007 12:30:35 EditProjectClosingWizard start
    18/11/2007 12:30:35 EditProjectClosingWizard start
    18/11/2007 12:30:35 Using IIS Version 5
    18/11/2007 12:30:35 Using default .NET 2.0 credentials
    18/11/2007 12:30:35 Using default .NET 2.0 credentials
    18/11/2007 12:30:35 Using default .NET 2.0 credentials
    18/11/2007 12:30:35 About to show wizard
    18/11/2007 12:30:37 Wizard dialog returned
    18/11/2007 12:30:38 UI Start profiling
    18/11/2007 12:30:38 ENGINE - Core2.dll found in regisry
    18/11/2007 12:30:38 ENGINE Start profiling performance of ASP.NET web application http://localhost/default.aspx
    18/11/2007 12:30:38 ENGINE The profiler is enabled
    18/11/2007 12:30:38 TRANSFER - Waiting for pipe connection from core
    18/11/2007 12:30:38 Starting IIS Profile host - checking if service available
    18/11/2007 12:30:38 Found ANTS Profiler 3 Service, attempting start
    18/11/2007 12:30:38 Service started. Checking port available
    18/11/2007 12:30:38 WaitForPort on address 127.0.0.1, port 8086
    18/11/2007 12:30:38 Port is accepting connections - service now running
    18/11/2007 12:30:38 ENGINE - Managed to hook into status updates from IIS Profile Host
    18/11/2007 12:36:09 ENGINE Closing profiling session


    and another file:

    18/11/2007 12:30:38 IISProfileHostLog initialized
    18/11/2007 12:30:38 PID = 3924
    18/11/2007 12:30:38 Log file name = IISProfileHostLog3924.txt
    18/11/2007 12:30:38 OS version = Microsoft Windows NT 5.1.2600 Service Pack 2
    18/11/2007 12:30:38 Machine name = BABYLON
    18/11/2007 12:30:38 User name = SYSTEM
    18/11/2007 12:30:38 StartProfilingIIS currentUserName BABYLON\Colin Wiseman, url http://localhost/default.aspx, .NET 2.0 Two, IIS5
    18/11/2007 12:30:38 Parse IIS metabase
    18/11/2007 12:30:38 InitServiceList
    18/11/2007 12:30:38 StartIIS
    18/11/2007 12:30:38 StopServicesInOrder
    18/11/2007 12:30:49 KillNamedProcess inetinfo.exe
    18/11/2007 12:30:49 ENGINE - WARNING - Process to be killed, inetinfo.exe, was not found
    18/11/2007 12:30:49 StartWebService IIS5, .NET Two
    18/11/2007 12:30:49 Using default .NET 2.0 credentials
    18/11/2007 12:30:49 ASPNET running as user ASPNET
    18/11/2007 12:30:49 ASPNET user SID S-1-5-21-527237240-764733703-725345543-1032
    18/11/2007 12:30:53 WaitForPort start, url = http://localhost/default.aspx
    18/11/2007 12:30:53 WaitForPort on address 127.0.0.1, port 80
    18/11/2007 12:30:53 WaitForPort done
    18/11/2007 12:40:30 StartProfilingIIS currentUserName BABYLON\Colin Wiseman, url http://localhost/default.aspx, .NET 2.0 Two, IIS5
    18/11/2007 12:40:30 Parse IIS metabase
    18/11/2007 12:40:31 InitServiceList
    18/11/2007 12:40:31 StartIIS
    18/11/2007 12:40:31 StopServicesInOrder
    18/11/2007 12:40:42 KillNamedProcess inetinfo.exe
    18/11/2007 12:40:42 ENGINE - WARNING - Process to be killed, inetinfo.exe, was not found
    18/11/2007 12:40:42 StartWebService IIS5, .NET Two
    18/11/2007 12:40:42 Using default .NET 2.0 credentials
    18/11/2007 12:40:42 ASPNET running as user ASPNET
    18/11/2007 12:40:42 ASPNET user SID S-1-5-21-527237240-764733703-725345543-1032
    18/11/2007 12:40:45 WaitForPort start, url = http://localhost/default.aspx
    18/11/2007 12:40:45 WaitForPort on address 127.0.0.1, port 80
    18/11/2007 12:40:45 WaitForPort done
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I don't mean to repeat myself, but the problem is Internet Explorer. You can see in the profiler logs that the profiling had started successfully, it just can't open the web browser because of a COM component problem in IE.
  • Hi and i don't mean to be cheeky, but i did do everything you told me and still no joy. And i am only trying to place as much information on this page that could get me help.

    But ok. What i will do tonight is completely remove IE7 (its shit anyways), and remove IE6 and reinstall IE6 and see what happens.

    Only problem is now the 14 days is up. Might not be able to test it.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Colin,

    I can private message you a trial extension code. If you need that, please let me know!
  • Sorry its taken so long to come back to you. I have now unistalled IE6, reinstalled it, fixed things and done whatever i could find to try and solve the problem.

    Could you pm the code?

    Cheers
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Sure thing!
  • still no joy. Bit of a bummer really as the product is going live in the near future. Although i can vouch for it, it would be really nice to get professional help.

    can you think of anything else before i give up?
  • Hi Colin,

    The GUId from the first stack dump suggests a class called PSFactoryBuffer. This is responsible for marshalling calls to certain type of COM components and it exists in oleaut32.dll. Maybe registering oleaut32.dll will fix the problem?

    Regsvr32 oleaut32.dll
  • Booyah!!!

    That did the trick! Thank you ever so much. I can now play to my hearts content for a couple of weeks now and see how things are running correctly.

    Cheers
  • Hello Everyone,

    I tried ANTS profiler 3 (trial version) for profiling .net Windows app and it worked flawlessely. Another team in my company wanted to use it for profiling ASP.Net app, which is giving us a hard time. Its crying for SHDocVw.dll in event log everytime.

    We have WinXp SP-2, IE7. ASP.net app uses Framework 1.1 and IIS 5. We have tried to reinstall IE, re-registered SHDocVw.dll and oleaut32.dll. Still no luck.

    We have enabled the log also which gets stuck after following line in ANTSProfilerLog

    1/31/2008 5:52:13 PM ENGINE - Managed to hook into status updates from IIS Profile Host

    and after following lines in IISProfileHostLog

    1/31/2008 5:52:29 PM WaitForPort start, url = http://localhost/App/login.aspx
    1/31/2008 5:52:29 PM WaitForPort on address 127.0.0.1, port 80
    1/31/2008 5:52:29 PM WaitForPort done

    I can post the eventlog and logs if that would help.

    Can someone please come for our rescue?

    Thanks,

    Sheetal
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    There is a possibility that the wrapper around IE's COM component (shdocvw.dll) is being loaded from the wrong directory. Possibly because some other sofware vendor created a wrapper with the same filename and installed it in the global assembly cache. The way to figure this out is to enable assembly binding logs. The log will tell you where ANTS Profiler was trying to load the assembly from and what went wrong.

    To do this, use regedit.exe and create a string value at
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\LogPath
    specifying an existing folder to put the log into.
    Next, create a DWORD value
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\LogFailures
    and set it to 1

    Run ANTS Profiler and cause the error to happen, then check your logging location, under the 'default' folder, for shdocvw*.htm. The log will detail the cause of the binding failure.

    Don't forget to set LogFailures back to 0 as it slows all of your .NET applications down.
Sign In or Register to comment.