ASP.NET 2.0 / ANTS 2.6 - The resource cannot be found.

I am attempting to profile an ASP.NET 2.0 application that is set up in IIS. When I browse to the page (http://localhost/myApp/myPage.aspx), I can access the page without a problem.

When I attempt to profile the page in ANTS, I am brought to the generic ASP.NET Exception page that has the following details:
Server Error in '/PRETSL' Application.

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

While ANTS is running, I can no longer access the page. When I close ANTS or stop profiling, I can access the page again.

Ideas?

Comments

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

    I do have one idea. If you are running ANTS Profiler on a server-class OS that can support multiple websites, you could have this problem if this particular website only answers requests for a certain host header. In that case, http://localhost could be answered by the wrong website.

    You'll need to manually enter the URL rather than using the dropdown if this is the case. That may also require you to set up an alias in your hosts file else ANTS Profiler may throw an error stating that you can only profile web applications on the local machine.
  • This is on my local dev machine running Windows XP w/ SP2. I have been manually entering the URL.

    Any other ideas?
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Can you please check the IIS logs (c:\windows\system32\logfiles\W3SVC1) and see if the 404 error is for the same page that you'd requested, or perhaps some other resource?
  • I have apparently the same problem.

    1. Environment:

    a) Windows 2003 server. multiple websites. default host header is for web site in question. no other websites have a default host header, they all use unique headers. This has been verified.

    b) Running both ASP.NET 1.1 and 2.0 websites, the web site in question is a 2.0 website.

    c) Red Gate ANTS Profiler version 2.6.0 BUILD 62


    2. Behavior:

    a) Without the profiler, I can start the website from IIS (E.G. http://localhost). can navigate to any page either with direct URL entry in the address bar or through navigation within the web site.

    b) With the profiler I get:
    Server Error in '/' Application.

    The resource cannot be found.
    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

    Requested Url: /default.aspx


    Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300


    Note the version information above.



    c) When I go to the IIS console I am prompted to reconnect. When I do, I refresh the console and see that ALL SITES ARE STOPPED.

    d) Looking at the IIS Log for the site I see a 200 status for the default.aspx page.

    e) Stopping the profiler (by closing the error page) restarts IIS correctly and the target web site is now running under ASP.NET 2.0, no other web sites are running.
  • On second thought, the 200 response is probably from manually running the web page and not from ANTS Profiler. I am thinking IIS did not process the request from the profiler because of the ASP.NET versioning problem.
  • I deleted all of the 1.1 web sites including the Microsoft Sharepoint Administration web site and I can now run the profiler.

    I think this is a medium term, medium severity problem for our company since we have the medium term requirement to be able to maintain both 1.1 and 2.0 web sites.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    Sounds like the Profiler has not correctly detected the version of .NET that the web application runs on. When Profiler starts profiling a web site, it queries the Metabase for the version of ASP .NET, thus launching the correct w3wp.exe. I think that if it cannot find the version info, it uses the website default. This is probably what happened.

    We'll have a look into this and try to find out what could have happened.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    If ANTS Profiler can't figure out which Framework to use by checking the IIS metabase, it will use the newest version. I'm willing to bet that would also be the default version of ASP .NET for the website.

    You should be able to fix this, or at least work around it, by configuring the web application you're profiling to also use the newest version of ASP .NET.
This discussion has been closed.