Default document in IIS loads after every page request in application.

  • Thread starter Thread starter aDc
  • Start date Start date
A

aDc

Hello,

I am getting some strange behavior with my ASP.NET application. Anytime I
make a request to a page in the application the page_load for that page is
fired as expected BUT then the page_load for the default document configured
in IIS (5.0) (in my case Default.aspx) fires also. This happens on every
request.
If I remove the default document in IIS or rename the page in the
application the default documents page_load event does not fire.

Any Ideas on what could be causing this.
 
In the "non Default.aspx Pages" are you by any chance inheriting from the Class in the code of the Default.aspx Page?


For instance, you are making a bunch of pages quickly...copy and paste them and forget to change that? or copied the @Page Directive
from "page1 (your default page)" into the others when copying an html layout you want to reuse.


Just a guess, Hope that helps ;-)
 
Is this happening in Visual Studio or IIS. Try to isolate the problem by
wrting the time to a text file in the 'page load' of the default document.
Run the app in VS debug mode and then hit the app through a browser. See if
you are exhibiting the same behaviour without using VS.

suPernoVa
 
Thanks for the suggestion, but I checked that out and everything looks good.
Also, if I actually change the default document in IIS to a different page
in my application it will exhibit the same behavior.

Chance Hopkins said:
In the "non Default.aspx Pages" are you by any chance inheriting from the
Class in the code of the Default.aspx Page?
For instance, you are making a bunch of pages quickly...copy and paste
them and forget to change that? or copied the @Page Directive
 
Thanks. I did this and it apears to be occurring with or without VS.NET.
In other words it occurs when I am debugging or when I just browse the site
directly.
 
Back
Top