No .Net methods have been profiled.

Hi
This is similar to another post that I have seen. I have downloaded the 14 days free trail ANTS Profiler 2.5, I have followed the instructions to profile performance.

It is working fine,
Before Starting my application it just restarts my IIS
Started my web application, I browse through the application
again it restarted IIS, But Showing 0 methods profiled.
Can any one help me.
Iam using WindowsXp professional.
.Net Framework 1.1.4322

I also have the "Enable Profiler" option on and I have compiled my solution with the "debug" option on. I have the .pdb file generated in the bin folder of my application.

Please help.

Kind Regards;
Ajit Goel

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Ajit,

    Yes, this is a very common problem caused by ANTS Profiler not being able to instrument the IL code. The cause is either one of three things:
    1. Your code did not load the runtime (due to caching, etc?)
    2. ANTS Profiler filtered out the code (could not locate the source or is disabled?)
    3. You have used the stop button, which throws all the results away
    4. ANTS Profiler is profiling the wrong application (used to happen frequently before 2.0, not so much any more)

    To rule out number one, check your ASP code to see if the page directive causing caching is enabled. For number two, try setting the profiling settings to profile all methods. If you get results, something is WRONG with the PDB. If that happens, try doing a rebuild. Visual Studio has been known to scramble PDBs.

    Hopefully this helps.
  • Hi Brian;

    First of all thanks so much for the quick answer.

    a. My application does not use caching at all.
    b. I have tried setting the profiling settings to profile all methods.
    c. I have tried doing a rebuild but nothing has worked so far.

    Please help.

    Kind Regards;

    Ajit Goel
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Ajit,

    It must be number 4, then. Have you got .NET Framework 1.0 installed on the server also?
  • Hi Brian;

    I am using my localmachine for the development as well as profiling of the application. It has 1.1.4322 version of the .net framework deployed.

    Kind Regards;

    Ajit Goel
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    Can you please check the version of ASP that your virtual directory is running under? Try opening a command prompt, changing to c:\windows\microsoft.net\Framework\v1.1.4322 and running aspnet_regiis -lk. This will show the virtual directories and what versions of the Framework are tied to them. Please make sure they're all 1.1.4322!
  • Brian-
    I have a virtual directory running under .NET 2.0 and I'm trying to profile a page that resides in it. I get this same error message (the one discussed above) every time. I have verified the four things listed above and none of these are the problem. The default web site is running on 1.1 and this virtual directory is running as 2.0. I can profile 2.0 code in a WinForm just fine and profiling a 1.1 page under the site root (which is running on .NET 1.1) works fine. Any ideas?

    thanks,
    Wes
    Wes Williams
    Senior Developer
    Marketworks, Inc.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Are you sure it doesn't work with the profile all .net methods setting?
  • I am positive. No matter which option I choose on the "Choose what code to profile" screen I get no results. I have tried this, by the way, in versions 2.1, 2.5 and 2.6 all with the same result (or lack there of).
    Wes Williams
    Senior Developer
    Marketworks, Inc.
  • Well, here's something interesting. Just for kicks I tried setting my default site (the root) to use 2.0 instead of 1.1 framework and it worked! So, my page is under a virtual directory running 2.0, but asp.net 2.0 pages under that VD will only profile if the root site is set to 2.0. Is that really the case? Seems to me that I should be able to keep the default site set to 1.1 and still be able to profile.
    Wes Williams
    Senior Developer
    Marketworks, Inc.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I don't see why not. I can tell you there is a difference specific to 1.1: because of the way that version of ASP .NET is implemented, it requires us to profile all processes for the ASPNET user rather than an individual process. This opens up a big fat can of worms because now we need to load and manipulate a user profile and that has security implications and adds extra complexity. I'll bet if you try to profile the site under 1.1 again, you may see a bunch of userenv warnings in the application event log!
  • Could it matter what user account I have the site to run under as the anonymous user? I'm currently using my domain account, which is an administrator on the box.
    Wes Williams
    Senior Developer
    Marketworks, Inc.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    The important one is the ASPNET user. All ASP .NET code, regardless of the web site's security configuration, will run under the ASPNET account. Now that account can also be changed, but it's a rather fiddly business of editing the Framework's machine.config file and configuring the processModel section to use a different user.

    Under IIS6 on Windows Server 2003, the security is set using the Application Pool configuration, so this shouldn't be an issue (although that brings in other issues all their own!).
  • I don't have any part of my site set up to impersonate a different user and I haven't messed with the aspnet user account as far as I know. Also, I'm running on Win XP Pro. So, any ideas?

    Thanks Brian!
    Wes Williams
    Senior Developer
    Marketworks, Inc.
  • Hello,

    Can you try enabling logging and send us the logs? To enable logging, create a folder called logs in the ANTS Profiler folder. When you start a profiling session, either one, two, or three files will be created. We can have a look at these and maybe they will tell us something.
  • Brian-
    So, here's the scenarios and what works (Root is the site root and nextgen is my virtual directory set to run on 2.0). In all scenarios I filter All .NET Methods:

    1) Root on 1.1, nextgen on 2.0 - no profiler results OR log files when hitting a 1.1 page under root or a 2.0 page under nextgen
    2) Root on 2.0, nextgen on 2.0 - I get profiler results AND one log file (UILog.txt) when hitting a 1.1 page under root and a 2.0 page under nextgen.

    In scenario #2 the log file (UILog.txt) just records this:
    11/17/2005 9:42:35 AM ProfilingSession.StartProfiler
    11/17/2005 9:49:08 AM ProfilingSession.GetProfilerResults
    11/17/2005 9:49:10 AM ProfilingSession.StopProfiling
    11/17/2005 9:49:26 AM ProfilingSession.Close

    If I could leave the root set to 2.0 I would just for simplicity. However, this is not how our production machines are set up, plus there are 1.1 pages that don't run on 2.0. Thanks for any help!
    Wes Williams
    Senior Developer
    Marketworks, Inc.
  • Hello,

    It's becoming clearer now. ANTS Profiler has some code in it (2.5+ anyway) to detect the ASP >NET version by querying the metabase. Now if it can't determine the version to profile against, it will fall back to whatever the root is configured to run, so I believe you've uncovered a clue...

    When you get the no .NET methods error page, I think you should still get a summary (at the top of the results). There is an item there called .NET Framework Version (4th from the top). Does this version match the version that the web application is configured to run against?
  • Well, I don't get a results summary page, so I can't check the version I guess. What happens is this:

    1) run wizard to launch to page (all .net methods)
    2) do some stuff
    3) close browser -> get the little dialog box in Profiler saying it's restarting iis
    4) then I get what looks like a javascript alert box that says:
    The web aplication en/login.aspx has not loaded the .NET Framework. Please check that en/login.aspx is an ASP.NET web application. Please note that accessing cached web pages will not load the .NET Framework.

    The page I'm hitting is http://localhost/nextgen/en/login.aspx. Once I click OK on the error message dialog I'm just back at the Profiler home page.
    Wes Williams
    Senior Developer
    Marketworks, Inc.
  • I think that there is a subtle difference between no .net methods have been profiled and the application has not loaded the .net framework. In the first case, the .NET runtime had been loaded but no methods were detected. In your case, though, it seems that the runtime had not even been loaded for your application.
  • Well, I don't use caching in any of my pages and the pages definitely work, so it's definitely loading the framework. sorry if I posted my problem on the wrong thread... I thought they sounded like the same problem. So, any ideas on my issue, then?
    Wes Williams
    Senior Developer
    Marketworks, Inc.
Sign In or Register to comment.