slow page load - empty code behind

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martin Eyles

    #1

    slow page load - empty code behind

    Hi,

    I have a .aspx page, but have not done any codeBehind for it. I use
    javascript to open this page, and on my development server this is fine.
    However, when I copy all the files to another server, and try running the
    same thing there, the page takes an age to load. (Note, the pop-up window
    opens quickly, but it takes a long time before the page opens in the
    pop-up).

    Does anyone have any idea why this is happening? Is there a problem with the
    way I am deploying the application (copying the files in a folder in my
    wwwroot to the other pc's wwwroot)?

    Thanks,
    Martin


  • Martin Eyles

    #2
    Re: slow page load - empty code behind

    Also, I've noticed one of my scripts doesn't work on one PC, but works on
    another. After investigating, found that on one server, the form my script
    references gets the id "__aspnetFo rm" and on the other it gets the id
    "Menu1_Form 1". Any ideas why the form name have different IDs?

    "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
    news:1287vlt1o9 asm46@corp.supe rnews.com...[color=blue]
    > Hi,
    >
    > I have a .aspx page, but have not done any codeBehind for it. I use
    > javascript to open this page, and on my development server this is fine.
    > However, when I copy all the files to another server, and try running the
    > same thing there, the page takes an age to load. (Note, the pop-up window
    > opens quickly, but it takes a long time before the page opens in the
    > pop-up).
    >
    > Does anyone have any idea why this is happening? Is there a problem with
    > the way I am deploying the application (copying the files in a folder in
    > my wwwroot to the other pc's wwwroot)?
    >
    > Thanks,
    > Martin
    >[/color]


    Comment

    • Marina Levit [MVP]

      #3
      Re: slow page load - empty code behind

      It sounds like ASP.NET is restarting. Is this only the first time that
      takes so long, right after you copy - or every time?

      "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
      news:1287vlt1o9 asm46@corp.supe rnews.com...[color=blue]
      > Hi,
      >
      > I have a .aspx page, but have not done any codeBehind for it. I use
      > javascript to open this page, and on my development server this is fine.
      > However, when I copy all the files to another server, and try running the
      > same thing there, the page takes an age to load. (Note, the pop-up window
      > opens quickly, but it takes a long time before the page opens in the
      > pop-up).
      >
      > Does anyone have any idea why this is happening? Is there a problem with
      > the way I am deploying the application (copying the files in a folder in
      > my wwwroot to the other pc's wwwroot)?
      >
      > Thanks,
      > Martin
      >[/color]


      Comment

      • Martin Eyles

        #4
        Re: slow page load - empty code behind

        "Marina Levit [MVP]" <someone@nospam .com> wrote in message
        news:e7IbgFKiGH A.3296@TK2MSFTN GP05.phx.gbl...[color=blue]
        > It sounds like ASP.NET is restarting. Is this only the first time that
        > takes so long, right after you copy - or every time?[/color]

        It is quicker after the first time. Thanks for pointing this out.

        This is however was masking another problem, which I have put in a reply to
        the original message. any help there would also be appreciated.

        Martin
        [color=blue]
        > "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
        > news:1287vlt1o9 asm46@corp.supe rnews.com...[color=green]
        >> Hi,
        >>
        >> I have a .aspx page, but have not done any codeBehind for it. I use
        >> javascript to open this page, and on my development server this is fine.
        >> However, when I copy all the files to another server, and try running the
        >> same thing there, the page takes an age to load. (Note, the pop-up window
        >> opens quickly, but it takes a long time before the page opens in the
        >> pop-up).
        >>
        >> Does anyone have any idea why this is happening? Is there a problem with
        >> the way I am deploying the application (copying the files in a folder in
        >> my wwwroot to the other pc's wwwroot)?
        >>
        >> Thanks,
        >> Martin[/color][/color]


        Comment

        • Marina Levit [MVP]

          #5
          Re: slow page load - empty code behind

          Sorry, I've never heard of something like that happening. I don't know why
          the server would be generating a different name for the form based on the PC
          the request came from, unless you have some code there to change this.

          I would put together a very simple page, and see if the problem still
          happens. If not, I would see what this page is doing that would cause this
          type of effect.

          "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
          news:1288dojqda 7as2c@corp.supe rnews.com...[color=blue]
          > "Marina Levit [MVP]" <someone@nospam .com> wrote in message
          > news:e7IbgFKiGH A.3296@TK2MSFTN GP05.phx.gbl...[color=green]
          >> It sounds like ASP.NET is restarting. Is this only the first time that
          >> takes so long, right after you copy - or every time?[/color]
          >
          > It is quicker after the first time. Thanks for pointing this out.
          >
          > This is however was masking another problem, which I have put in a reply
          > to the original message. any help there would also be appreciated.
          >
          > Martin
          >[color=green]
          >> "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
          >> news:1287vlt1o9 asm46@corp.supe rnews.com...[color=darkred]
          >>> Hi,
          >>>
          >>> I have a .aspx page, but have not done any codeBehind for it. I use
          >>> javascript to open this page, and on my development server this is fine.
          >>> However, when I copy all the files to another server, and try running
          >>> the same thing there, the page takes an age to load. (Note, the pop-up
          >>> window opens quickly, but it takes a long time before the page opens in
          >>> the pop-up).
          >>>
          >>> Does anyone have any idea why this is happening? Is there a problem with
          >>> the way I am deploying the application (copying the files in a folder in
          >>> my wwwroot to the other pc's wwwroot)?
          >>>
          >>> Thanks,
          >>> Martin[/color][/color]
          >
          >[/color]


          Comment

          • Martin Eyles

            #6
            Re: slow page load - empty code behind

            OK, I have taken a look at the system. The way it works is that there is a
            page, and 1 custom control. The main page doesn't have a form, but the
            control does. The name of the form on my development server is __aspnetForm,
            and the name of the form on the server I deploy to is of the form
            controlInstance Name_Form1.

            Does this help the diagnosis?

            Thanks,
            Martin

            "Marina Levit [MVP]" <someone@nospam .com> wrote in message
            news:eNurefKiGH A.764@TK2MSFTNG P03.phx.gbl...[color=blue]
            > Sorry, I've never heard of something like that happening. I don't know
            > why the server would be generating a different name for the form based on
            > the PC the request came from, unless you have some code there to change
            > this.
            >
            > I would put together a very simple page, and see if the problem still
            > happens. If not, I would see what this page is doing that would cause
            > this type of effect.
            >
            > "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
            > news:1288dojqda 7as2c@corp.supe rnews.com...[color=green]
            >> "Marina Levit [MVP]" <someone@nospam .com> wrote in message
            >> news:e7IbgFKiGH A.3296@TK2MSFTN GP05.phx.gbl...[color=darkred]
            >>> It sounds like ASP.NET is restarting. Is this only the first time that
            >>> takes so long, right after you copy - or every time?[/color]
            >>
            >> It is quicker after the first time. Thanks for pointing this out.
            >>
            >> This is however was masking another problem, which I have put in a reply
            >> to the original message. any help there would also be appreciated.
            >>
            >> Martin
            >>[color=darkred]
            >>> "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
            >>> news:1287vlt1o9 asm46@corp.supe rnews.com...
            >>>> Hi,
            >>>>
            >>>> I have a .aspx page, but have not done any codeBehind for it. I use
            >>>> javascript to open this page, and on my development server this is
            >>>> fine. However, when I copy all the files to another server, and try
            >>>> running the same thing there, the page takes an age to load. (Note, the
            >>>> pop-up window opens quickly, but it takes a long time before the page
            >>>> opens in the pop-up).
            >>>>
            >>>> Does anyone have any idea why this is happening? Is there a problem
            >>>> with the way I am deploying the application (copying the files in a
            >>>> folder in my wwwroot to the other pc's wwwroot)?
            >>>>
            >>>> Thanks,
            >>>> Martin[/color]
            >>
            >>[/color]
            >
            >[/color]


            Comment

            • Marina Levit [MVP]

              #7
              Re: slow page load - empty code behind

              What if someone placed 2 of these controls on one page? You would end up
              with 2 server side forms - which you can't have.

              The typical way this is handled, is to have the form on the page, and the
              user control, or web control, is simply placed on the page and becomes part
              of its form.

              "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
              news:1288krjk0f 9fs82@corp.supe rnews.com...[color=blue]
              > OK, I have taken a look at the system. The way it works is that there is a
              > page, and 1 custom control. The main page doesn't have a form, but the
              > control does. The name of the form on my development server is
              > __aspnetForm, and the name of the form on the server I deploy to is of the
              > form controlInstance Name_Form1.
              >
              > Does this help the diagnosis?
              >
              > Thanks,
              > Martin
              >
              > "Marina Levit [MVP]" <someone@nospam .com> wrote in message
              > news:eNurefKiGH A.764@TK2MSFTNG P03.phx.gbl...[color=green]
              >> Sorry, I've never heard of something like that happening. I don't know
              >> why the server would be generating a different name for the form based on
              >> the PC the request came from, unless you have some code there to change
              >> this.
              >>
              >> I would put together a very simple page, and see if the problem still
              >> happens. If not, I would see what this page is doing that would cause
              >> this type of effect.
              >>
              >> "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
              >> news:1288dojqda 7as2c@corp.supe rnews.com...[color=darkred]
              >>> "Marina Levit [MVP]" <someone@nospam .com> wrote in message
              >>> news:e7IbgFKiGH A.3296@TK2MSFTN GP05.phx.gbl...
              >>>> It sounds like ASP.NET is restarting. Is this only the first time that
              >>>> takes so long, right after you copy - or every time?
              >>>
              >>> It is quicker after the first time. Thanks for pointing this out.
              >>>
              >>> This is however was masking another problem, which I have put in a reply
              >>> to the original message. any help there would also be appreciated.
              >>>
              >>> Martin
              >>>
              >>>> "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
              >>>> news:1287vlt1o9 asm46@corp.supe rnews.com...
              >>>>> Hi,
              >>>>>
              >>>>> I have a .aspx page, but have not done any codeBehind for it. I use
              >>>>> javascript to open this page, and on my development server this is
              >>>>> fine. However, when I copy all the files to another server, and try
              >>>>> running the same thing there, the page takes an age to load. (Note,
              >>>>> the pop-up window opens quickly, but it takes a long time before the
              >>>>> page opens in the pop-up).
              >>>>>
              >>>>> Does anyone have any idea why this is happening? Is there a problem
              >>>>> with the way I am deploying the application (copying the files in a
              >>>>> folder in my wwwroot to the other pc's wwwroot)?
              >>>>>
              >>>>> Thanks,
              >>>>> Martin
              >>>
              >>>[/color]
              >>
              >>[/color]
              >
              >[/color]


              Comment

              • Martin Eyles

                #8
                Re: slow page load - empty code behind

                "Marina Levit [MVP]" <someone@nospam .com> wrote in message
                news:%23w$c52Mi GHA.1264@TK2MSF TNGP05.phx.gbl. ..[color=blue]
                > What if someone placed 2 of these controls on one page? You would end up
                > with 2 server side forms - which you can't have.[/color]

                Why not?
                [color=blue]
                > The typical way this is handled, is to have the form on the page, and the
                > user control, or web control, is simply placed on the page and becomes
                > part of its form.[/color]

                OK, will try this, and will hopefully work. Thanks.
                [color=blue]
                > "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
                > news:1288krjk0f 9fs82@corp.supe rnews.com...[color=green]
                >> OK, I have taken a look at the system. The way it works is that there is
                >> a page, and 1 custom control. The main page doesn't have a form, but the
                >> control does. The name of the form on my development server is
                >> __aspnetForm, and the name of the form on the server I deploy to is of
                >> the form controlInstance Name_Form1.
                >>
                >> "Marina Levit [MVP]" <someone@nospam .com> wrote in message
                >> news:eNurefKiGH A.764@TK2MSFTNG P03.phx.gbl...[color=darkred]
                >>> Sorry, I've never heard of something like that happening. I don't know
                >>> why the server would be generating a different name for the form based
                >>> on the PC the request came from, unless you have some code there to
                >>> change this.
                >>>
                >>> I would put together a very simple page, and see if the problem still
                >>> happens. If not, I would see what this page is doing that would cause
                >>> this type of effect.
                >>>
                >>> "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
                >>> news:1288dojqda 7as2c@corp.supe rnews.com...
                >>>>
                >>>> This is however was masking another problem, which I have put in a
                >>>> reply to the original message. any help there would also be
                >>>> appreciated.[/color][/color][/color]


                Comment

                • Martin Eyles

                  #9
                  Re: slow page load - empty code behind

                  "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
                  news:128af9j45p psl2a@corp.supe rnews.com...[color=blue]
                  > "Marina Levit [MVP]" <someone@nospam .com> wrote in message
                  > news:%23w$c52Mi GHA.1264@TK2MSF TNGP05.phx.gbl. ..[color=green]
                  >> The typical way this is handled, is to have the form on the page, and the
                  >> user control, or web control, is simply placed on the page and becomes
                  >> part of its form.[/color]
                  >
                  > OK, will try this, and will hopefully work. Thanks.[/color]

                  Works beautifully. I now have a form with id="Form1" on all pages.

                  Once again, thanks! :-)

                  Martin
                  [color=blue][color=green]
                  >> "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
                  >> news:1288krjk0f 9fs82@corp.supe rnews.com...[color=darkred]
                  >>> OK, I have taken a look at the system. The way it works is that there is
                  >>> a page, and 1 custom control. The main page doesn't have a form, but the
                  >>> control does. The name of the form on my development server is
                  >>> __aspnetForm, and the name of the form on the server I deploy to is of
                  >>> the form controlInstance Name_Form1.
                  >>>
                  >>> "Marina Levit [MVP]" <someone@nospam .com> wrote in message
                  >>> news:eNurefKiGH A.764@TK2MSFTNG P03.phx.gbl...
                  >>>> Sorry, I've never heard of something like that happening. I don't know
                  >>>> why the server would be generating a different name for the form based
                  >>>> on the PC the request came from, unless you have some code there to
                  >>>> change this.
                  >>>>
                  >>>> I would put together a very simple page, and see if the problem still
                  >>>> happens. If not, I would see what this page is doing that would cause
                  >>>> this type of effect.
                  >>>>
                  >>>> "Martin Eyles" <martin.eyles@N OSPAMbytronic.c om> wrote in message
                  >>>> news:1288dojqda 7as2c@corp.supe rnews.com...
                  >>>>>
                  >>>>> This is however was masking another problem, which I have put in a
                  >>>>> reply to the original message. any help there would also be
                  >>>>> appreciated.[/color][/color][/color]


                  Comment

                  Working...