Exception starting profiling ASP.Net on http://localhost

Brian DonahueBrian Donahue Posts: 6,590 New member
Hi Steve,

Thanks for your post. This error usually indicates that the .NET runtime cannot load the profiler, which is a COM component, into the application that you're trying to profile. I would try re-registering the ANTS Profiler COM component, RedGate.Profiler.Core2.dll, using the regsvr32 utility:
c:\program files\red gate\ants profiler>regsvr32 RedGate.Profiler.Core2.dll

If the component still doesn't work, you may want to check your system environment variables for other profilers that may have not been completely uninstalled from your system. Since they work pretty much in the same fashion as ANTS, they may cause problems if they're not completely uninstalled.

Please check the COR_PROFILER and COR_ENABLE_PROFILING variables to see if they are set. The former is normally set to the class ID of a COM object (a very long GUID string), and the latter is either zero or one. Change these to nothing if they are present.

Please let me know if I can help any further.

Comments

  • Hi,

    Actually it turned out to be a bit simpler than that. I had these problems:

    First I had to disable MS AntiSpyware (will you be fixing this in the future).

    Then I discovered that I couldn't use the syntax http://localhost/default.aspx (ie it has to be a folder). Come on, this shouldn't cause an exception!

    Finally I discovered that there was a profiler process hanging around (probably a dead one from all the exceptions) once I killed that it seemed to run OK.

    On the whole it seems to do the job - bit it's a bit 'fragile' to say the least...

    S.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Steve,

    The URL that you had mentioned would not normally cause an exception. I don't know why that happened. If ANTS Profiler throws an exception, it will most likely exit. I'd wager that you probably killed off the ANTS Profiler Service that is always running in the background. You can shut that down from the Services control panel and set it to start manually. When it needs to be running, the front-end of ANTS Profiler will start it for you.
  • H,
    I think is was Redgate.Profiler.UI.exe or something...

    S.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Steve,

    That would be Profiler's front-end, then!
  • Yeah, that's what I thought, though at the time no UI was displayed.

    Anyway, it all seems to be OK at the moment - even with MS AntiSpyware running. Wierd thing is I haven't changed anything (though MS AS did update it's signatures today).

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

    This message is a different one altogether. It's an incorrectly-registered IE component causing the problem, and it's easy to fix.

    Open a command prompt and type 'regsvr32 shdocvw.dll' and you will not get the error next time you profile an ASP .NET web application.
This discussion has been closed.