ASP.NET 2.0 / ANTS 2.6 - The resource cannot be found.
gisenberg
Posts: 3
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:
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?
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?
This discussion has been closed.
Comments
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.
Any other ideas?
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.
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.
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.
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.