.net loads twice for no reason

I have an unusual problem. Each page in my web application loads twice! When debugging the onload event is hit twice. I checked the iis logs and saw them.

My application is.net 3.5, asp.net C # works in IIS7.

This occurs in several different environments.

This is not only one page, but all pages on the site. To test this, I created a blank page, without markup, for example. non-empty source tags in images or iframes that I read can trigger it. I also removed all httpmodules from web.config and httphandlers, but its still happening.

Now I have no ideas, so does anyone have any tips or advice for me?

+4
source share
4 answers

There may be different reasons

  • Check in different browsers, see if any add-ons have caused.
  • Check this if PostBack causes the next download.
  • See if you are in debug mode, then debug the code, if possible, to see how it really loads two times.
0
source

I know that you have already answered your question, but for others who are landing here ...

A few years ago, I found out (after several days of disappointment) that the pages loaded twice during each postback because someone wrote custom controls to display the html content, but there was an error in these controls that caused incorrect markup (I didn't I remember that it was, perhaps, they forgot the closing tag somewhere), and this made my browser reload the page.

Look at any errors that your browser may find with your generated markup, and fix them as part of the troubleshooting.

+1
source

You need to check if AutoEventWireUp is set to true, and also manually add a listener to the Load event. This (or some option) of this will be your problem (which is quite common, there are many questions here).

0
source

I think it’s better to use some web debugger tools to track the request. I suggest using fiddler

0
source

All Articles