Options

Cannot profile ASP.NET 2.0 on x64: wwwroot hard-coded?

When trying to do performance profiling on an ASP.NET 2.0 application (say, http://localhost/foo/bar.aspx), when IE appears, it just displays a 404 error for http://localhost:8013/foo/bar.aspx.

We ran filemon and discovered that ANTS Profiler is trying to access the web application within c:\inetpub\wwwroot. However, our application is NOT located there, and our virtual directory is NOT pointing there (and works fine without ANTS Profiler). Is "c:\inetpub\wwwroot" hard-coded in ANTS Profiler? This wasn't the case in earlier versions of ANTS Profiler on our previous generation of .NET 1.1 PCs....

We tried faking out ANTS using "junction" (from http://www.sysinternals.com) to make a symbolic link from c:\inetpub\wwwroot to our actual application folder. This worked a bit -- we did get some profiling results within ANTS, but our app doesn't run properly in c:\inetpub\wwwroot. So the experiment was worthwhile, but we shouldn't have to do this.... :-)

Possibly related: we have a bunch of virtual directories within IIS. We don't know how ANTS knows which one to use, so just to be safe, we stopped all of them except the one we wanted. Didn't make a difference.

Any ideas?

ANTS Profiler version 2.7.1
.NET framework 2.0

Here's the filemon output:

2:31:23 PM w3wp.exe:3324 QUERY INFORMATION C:\Inetpub\wwwroot\foo NOT FOUND Attributes: Error
2:31:23 PM w3wp.exe:3324 QUERY INFORMATION C:\Inetpub\wwwroot\foo NOT FOUND Attributes: Error
2:31:23 PM w3wp.exe:3324 QUERY INFORMATION C:\Inetpub\wwwroot\foo\bar.aspx PATH NOT FOUND Attributes: Error
2:31:23 PM w3wp.exe:3324 QUERY INFORMATION C:\Inetpub\wwwroot\foo NOT FOUND Attributes: Error
2:31:23 PM w3wp.exe:3324 OPEN C:\Inetpub\wwwroot\foo\bar.aspx PATH NOT FOUND Options: Open Access: All
2:31:23 PM w3wp.exe:3324 QUERY INFORMATION C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2b6a5b1a\f1fc7dee\bar.aspx.33ec4e.compiled NOT FOUND Attributes: Error


Here's some log output:

CoreLog.txt:

1/10/2007 7:21:34 PM ANTS Profiler v2.7, Core2 (release) log created
1/10/2007 7:21:34 PM ProfilerBase::StartPipeClient
1/10/2007 7:21:34 PM PipeClient::StartPipes
1/10/2007 7:21:34 PM PIPE:Data pending
1/10/2007 7:21:34 PM Message read from pipe StartSendingProfilerSettingsMessage
1/10/2007 7:21:34 PM Profiling settings read from pipe
1/10/2007 7:21:34 PM PipeClient::SendProcessInfo
1/10/2007 7:21:34 PM Process C:\WINDOWS\system32\inetsrv\w3wp.exe
1/10/2007 7:21:34 PM Running runtime version v2.0.50727
1/10/2007 7:21:34 PM Transfer has validated the process info. We will profile this process
1/10/2007 7:21:34 PM Pipe client started
1/10/2007 7:21:34 PM Profiling process C:\WINDOWS\system32\inetsrv\w3wp.exe
1/10/2007 7:21:34 PM .NET Framework version 2 running
1/10/2007 7:21:34 PM Module loaded, C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll
1/10/2007 7:21:34 PM Assembly loaded mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
1/10/2007 7:21:34 PM AppDomain created name mscorlib.dll
1/10/2007 7:21:34 PM AppDomain created name DefaultDomain
1/10/2007 7:21:34 PM AppDomain created name EE Shared Assembly Repository
1/10/2007 7:21:34 PM Module loaded, C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\sorttbls.nlp
1/10/2007 7:21:35 PM Module loaded, C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll
1/10/2007 7:21:35 PM Assembly loaded System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
1/10/2007 7:21:35 PM No Symbols loaded for module C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll
1/10/2007 7:21:35 PM Module loaded, C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll
1/10/2007 7:21:35 PM Assembly loaded System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
1/10/2007 7:21:35 PM No Symbols loaded for module C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll
1/10/2007 7:21:35 PM Module loaded, C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\sortkey.nlp
1/10/2007 7:21:35 PM AppDomain created name /LM/W3SVC/87257621/Root-1-128129304952470355
1/10/2007 7:21:35 PM Module loaded, C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll
1/10/2007 7:21:35 PM Assembly loaded System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
1/10/2007 7:21:35 PM No Symbols loaded for module C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll
1/10/2007 7:21:35 PM Module loaded, C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll
1/10/2007 7:21:35 PM Assembly loaded System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
1/10/2007 7:21:35 PM No Symbols loaded for module C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll
1/10/2007 7:21:36 PM Module loaded, C:\WINDOWS\assembly\GAC_MSIL\Microsoft.JScript\8.0.0.0__b03f5f7f11d50a3a\Microsoft.JScript.dll
1/10/2007 7:21:36 PM Assembly loaded Microsoft.JScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null
1/10/2007 7:21:36 PM Module loaded, C:\WINDOWS\assembly\GAC_32\VJSharpCodeProvider\2.0.0.0__b03f5f7f11d50a3a\VJSharpCodeProvider.dll
1/10/2007 7:21:36 PM Assembly loaded VJSharpCodeProvider, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
1/10/2007 7:21:36 PM Module loaded, C:\WINDOWS\assembly\GAC_MSIL\CppCodeProvider\8.0.0.0__b03f5f7f11d50a3a\CppCodeProvider.dll
1/10/2007 7:21:36 PM Assembly loaded CppCodeProvider, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null
1/10/2007 7:21:37 PM Module loaded, C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll
1/10/2007 7:21:37 PM Assembly loaded System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
1/10/2007 7:21:37 PM No Symbols loaded for module C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll
1/10/2007 7:21:38 PM Module loaded, C:\WINDOWS\assembly\GAC_MSIL\System.Web.RegularExpressions\2.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll
1/10/2007 7:21:38 PM Assembly loaded System.Web.RegularExpressions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
1/10/2007 7:21:38 PM No Symbols loaded for module C:\WINDOWS\assembly\GAC_MSIL\System.Web.RegularExpressions\2.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll

ANTSProfilerLog3256.txt:

1/10/2007 2:21:33 PM ANTSProfilerLog initialized
1/10/2007 2:21:33 PM PID = 3256
1/10/2007 2:21:33 PM Log file name = ANTSProfilerLog3256.txt
1/10/2007 2:21:33 PM OS version = Microsoft Windows NT 5.2.3790 Service Pack 1
1/10/2007 2:21:33 PM Machine name = DEV02
1/10/2007 2:21:33 PM User name = danb
1/10/2007 2:21:33 PM UI Start profiling
1/10/2007 2:21:33 PM ENGINE Start profiling performance of ASP.NET web application http://localhost/foo/bar.aspx
1/10/2007 2:21:33 PM ENGINE The profiler is enabled
1/10/2007 2:21:33 PM TRANSFER - Waiting for pipe connection from core
1/10/2007 2:21:34 PM TRANSFER - Pipe connected from core
1/10/2007 2:21:34 PM TRANSFER - Start sending profiler settings to core
1/10/2007 2:21:34 PM TRANSFER - Finished sending profiler settings to core
1/10/2007 2:21:34 PM TRANSFER - Process info received from core C:\WINDOWS\system32\inetsrv\w3wp.exe
1/10/2007 2:21:34 PM TRANSFER - .NET Framework version for profiled process is 2.0.50727
1/10/2007 2:21:34 PM TRANSFER - Correct process connected
1/10/2007 2:21:34 PM TRANSFER - Listening for shutdown event from core
1/10/2007 2:21:34 PM ENGINE Profiling connection established

ServiceLog2276.txt:

1/10/2007 2:20:44 PM ServiceLog initialized
1/10/2007 2:20:44 PM PID = 2276
1/10/2007 2:20:44 PM Log file name = ServiceLog2276.txt
1/10/2007 2:20:44 PM OS version = Microsoft Windows NT 5.2.3790 Service Pack 1
1/10/2007 2:20:44 PM Machine name = DEV02
1/10/2007 2:20:44 PM User name = SYSTEM
1/10/2007 2:20:44 PM ANTS Profiler service Start up
1/10/2007 2:21:33 PM StartProfilingIIS currentUserName VISTAPRINTUS\danb, url http://localhost/foo/bar.aspx, .NET 2.0 True
1/10/2007 2:21:33 PM Parse IIS metabase
1/10/2007 2:21:33 PM InitServiceList
1/10/2007 2:21:33 PM StartIIS
1/10/2007 2:21:34 PM StartWebService for IIS 6
1/10/2007 2:21:34 PM Url not found in store http://localhost/foo/bar.aspx
1/10/2007 2:21:34 PM WaitForPort start, url = http://localhost:8013/vp/foo/bar.aspx
1/10/2007 2:21:34 PM WaitForPort done

Comments

  • Options
    Hi,

    The inetpub directory certainly shouldn't be hard coded, and likewise you shouldn't have to be setting up symlinks to get profiling working!

    From the logs, I'm assuming you're running IIS6. ANTS should get the details of the site / application / virtual directory from the IIS Metabase, which in turn gives us the physical path.

    However, it looks like in your case this isn't happening properly - in particular, the line:
    1/10/2007 2:21:34 PM Url not found in store http://localhost/foo/bar.aspx
    
    says that this is unsuccessful, in which case it will fall back to taking the information from the default web site (id 1). This could be the cause of it looking at c:\inetpub\wwwroot.

    Could you try profiling with the URL as the name of the application, rather than the full URL - so something like http://localhost/foo? Alternatively, check that your site appears in the drop-down list of sites in the ANTS wizard, and select one of these.

    Hope that helps,
    Rob
    Robert Chipperfield
    Red Gate
  • Options
    None of our apps showed up in the dropdown in the wizard.

    Looks like ANTS Profile can bind only to apps in 127.0.0.1. Ours are in 127.0.0.*, which are also legitimate local IP addresses.
  • Options
    Hi,

    I've had a quick look into ANTS' behaviour with addresses in the 127.0.0/24 range, and I received a "This machine is not local" message if I typed such an address in under ANTS 2.7.1. I agree this shouldn't be the case, and it will be fixed in forthcoming versions of ANTS.

    However, your test appears to be based on typing in the URL "http://localhost", which does only resolve to 127.0.0.1, so if your application is bound to 127.0.0.n, then entering localhost won't work, I think.

    I think the workaround here would be to add a binding to the site you wish to profile in IIS Manager such that it also binds to some random port on 127.0.0.1 - e.g. 127.0.0.1:1234. Having done this, enter the new (127.0.0.1 based) URL into ANTS, and with a bit of luck that should work.

    My last concern, though, is that your original subject suggests you're running ANTS on x86_64 - which isn't supported at present. If you're running a 32-bit OS on 64-bit hardware, that should be fine, but if you're running a 64-bit OS, IIS will probably also be running in 64-bit mode, at which point we can't profile it.

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