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

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.
 
C

Chance Hopkins

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 ;-)
 
G

Greg S

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
 
A

aDc

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
 
A

aDc

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top