Nothing works as expected

Code profiling for .NET Developers

Moderators: StephenC, Alex.Davies, AndrewH

Nothing works as expected

Postby osocurious » Thu Sep 24, 2009 3:47 pm

Okay, so far this is a huge waste of money, I hope it's just user error.
I'm trying to profile a website where the code lives on my box.
1) In VS2008, the top 3 menu items (Profile Performance, Profile Method level Performance, Profile Memory) are grayed out and nothing I do activates them.
2) If I use the Launch ANTS Performance Profile option I then select 'ASP.NET web application hosted in web development'. I point to the same default.aspx file that runs when I run it from within VS2008. However, it doesn't seem to work properly, it sort of works, shows pages etc. but doesn't bring back any data from the database.
3) It doesn't seem to see the .pdb files in the bin directory. It only profiles very basic pages methods, none of the dll's (and I have a lot of dlls with full code and pdb's) get profiled.

So far, honestly, it's a POS. I hope I'm wrong and someone can point me in the direction necessary to profile a web app.
Posts: 2
Joined: Thu Sep 24, 2009 3:37 pm

Postby osocurious » Fri Sep 25, 2009 4:27 pm

Okay, POS was a bit strong, sorry. I was just having a frustrating day yesterday. Basically I have 2 questions.

1) How do I profile a web application in VS2008 that profiles everything in the solution

2) or if that isn't possible, how do I profile a web application in such a way that it loads the proper config files and uses the .pdb files so I profile everything and not just the first couple of .aspx pages.

Posts: 2
Joined: Thu Sep 24, 2009 3:37 pm

Postby Chris.Allen » Fri Sep 25, 2009 5:31 pm

Occasionally, you may experience problems accessing the full menus of the ANTS addins in Visual Studio 2005 and 2008 in that the menu items are grayed out entirely.

The following actions can be used to try to correct the problem:

1. Export your current VS settings into a file via Tools->Import And Export Settings
2. Choose the Visual Studio command prompt tool from the start menu, under the Visual Studio program group.
3. Execute the following commands:

>devenv /resetsettings
>regasm /codebase "%programfiles%\\red gate\\ants performance profiler 5\\RedGate.Profiler.Five.AddIn.dll"

[You may get a warning here which is safe to ignore but you should finally get the message: "Types registered successfully"]

>devenv /setup

Now your add-in should be re-initilaized. Ensure you have a ready-to-run project loaded into VS and the addin integration should work perfectly.

4. Import your saved settings via Tools->Import And Export Settings

Profiling in VS2008 should now work as well as running it from VS2008.

If you're still not getting full results can you send saved results file to:

Often, its a case of switching off some of the default filters.
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm


Postby 3ill » Tue Sep 29, 2009 2:01 pm

Any updates on this?

I'm running into the exact same problem.

I have followed the steps to reset my VS2008 profile and also tried selecting a minimal set of counters but with no luck - The first three options under the ANTS 5 menu are still disabled.

I cant even save the profile results as I get an exception when trying to do so:

Object reference not set to an instance of an object.
at c.b(Object , GenericEventArgs`1 )
at ae.<>c__DisplayClass8.<.ctor>b__3()
at O.b()

Any help would be greatly appreciated!
Posts: 1
Joined: Tue Sep 29, 2009 1:47 pm

Postby Chris.Allen » Tue Sep 29, 2009 6:58 pm

We'd have to look at the logs to understand this better. They are here:

%userprofile%\\Local Settings\\Application Data\\Red Gate\\ANTS Performance Profiler 5

Usually the quickest way to get up and running is try a different machine (virtual machines work well too) or a even different log-in account. I find that Windows environments (.NET, Visual Studio settings etc) are not 100% stable and the chances are very good that a different environment will help.
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm

Return to ANTS Performance Profiler 5

Who is online

Users browsing this forum: No registered users and 0 guests