Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. code being displayed at the top of the page

code being displayed at the top of the page

Scheduled Pinned Locked Moved ASP.NET
helpcsharpcssasp-netsysadmin
9 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    todd 01011101
    wrote on last edited by
    #1

    Hello This is my first time posting here. I get the codeproject newsletters and love them. Anyway, the problem.. The app that I am responsible for is written in ASP.net, and it's running on 2 load balanced servers behind an alteon LB. *Most* of the time everything seems to work properly, but sometimes, code from the source of the page is displayed at the top of the page, and when this happens the .css is not applied to the page and the buttons do not work. :sigh: This only happens occasionally, at seemingly random pages in the app; And - if the user (tester in this case) refreshes the page it redraws fine, and they can proceed without issue. Due to the sparadic nature of the problem I'm thinking it may be a timing issue or a configuration issue on the server(s).? I've attempted to google this, but I'm not sure what search terms to use to return results, any insights or ideas would be greatly appreciated. Has anyone here seen this happen with their app? Or fixed it? Thanks in advance.. Todd.

    J 1 Reply Last reply
    0
    • T todd 01011101

      Hello This is my first time posting here. I get the codeproject newsletters and love them. Anyway, the problem.. The app that I am responsible for is written in ASP.net, and it's running on 2 load balanced servers behind an alteon LB. *Most* of the time everything seems to work properly, but sometimes, code from the source of the page is displayed at the top of the page, and when this happens the .css is not applied to the page and the buttons do not work. :sigh: This only happens occasionally, at seemingly random pages in the app; And - if the user (tester in this case) refreshes the page it redraws fine, and they can proceed without issue. Due to the sparadic nature of the problem I'm thinking it may be a timing issue or a configuration issue on the server(s).? I've attempted to google this, but I'm not sure what search terms to use to return results, any insights or ideas would be greatly appreciated. Has anyone here seen this happen with their app? Or fixed it? Thanks in advance.. Todd.

      J Offline
      J Offline
      Jason Weibel
      wrote on last edited by
      #2

      It sounds like the project was built in debug mode and an error occurred.

      Jason

      T 1 Reply Last reply
      0
      • J Jason Weibel

        It sounds like the project was built in debug mode and an error occurred.

        Jason

        T Offline
        T Offline
        todd 01011101
        wrote on last edited by
        #3

        I REALLY don't think it was built in debug mode, as a matter of fact there is information displayed prominently on the page when the app is in debug mode, and those are not displayed, so I can be reasonably certain that is not the specific cause. I also ensured early on that the 'debug=false' in the 'compilation' key in the web.config. It's an interesting suggestion though, so if you don't mind me asking, why do you think that is what it sounds like?

        J 1 Reply Last reply
        0
        • T todd 01011101

          I REALLY don't think it was built in debug mode, as a matter of fact there is information displayed prominently on the page when the app is in debug mode, and those are not displayed, so I can be reasonably certain that is not the specific cause. I also ensured early on that the 'debug=false' in the 'compilation' key in the web.config. It's an interesting suggestion though, so if you don't mind me asking, why do you think that is what it sounds like?

          J Offline
          J Offline
          Jason Weibel
          wrote on last edited by
          #4

          When an app is compiled in debug mode and an unhandled error occurs the error will be printed to the screen along with the code that it erred on. My guess was that a custom component was being used for the header and that erred. The message was sent to the screen and that is want you were seeing. To help resolve this could you tell me more about your environment? What version of visual studio, language, are frames used? The other guess I had was the original developer used response.write for debugging and that is what you are seeing.

          Jason

          T 1 Reply Last reply
          0
          • J Jason Weibel

            When an app is compiled in debug mode and an unhandled error occurs the error will be printed to the screen along with the code that it erred on. My guess was that a custom component was being used for the header and that erred. The message was sent to the screen and that is want you were seeing. To help resolve this could you tell me more about your environment? What version of visual studio, language, are frames used? The other guess I had was the original developer used response.write for debugging and that is what you are seeing.

            Jason

            T Offline
            T Offline
            todd 01011101
            wrote on last edited by
            #5

            Hi Jason Thanks for the response. The app is developed with VS.NET 2003. The language is VB. <-- is that what you mean? The page is displayed in en-CA and fr-CA, the problem occurs in both. No frames are used anywhere in the app. The code displayed is not code from the code-behind page, and no errors are thrown. The code displayed is the actual source of the page, as though a quote or closing tag is missing from the html section of the source of the page when it is generated. I'm thinking the component of .NET that generates the html output for IIS based on the execution of the code/codebehind .. Do you know what the name of the part of .NET is?, and if it has any configuration settings? I know that the machine.config has a listing of browsers in it. I'm thinking theres a connection between those two things, but there are significant gaps in my understanding of how that whole thing works under the hood. So any clarification would be useful.

            J 1 Reply Last reply
            0
            • T todd 01011101

              Hi Jason Thanks for the response. The app is developed with VS.NET 2003. The language is VB. <-- is that what you mean? The page is displayed in en-CA and fr-CA, the problem occurs in both. No frames are used anywhere in the app. The code displayed is not code from the code-behind page, and no errors are thrown. The code displayed is the actual source of the page, as though a quote or closing tag is missing from the html section of the source of the page when it is generated. I'm thinking the component of .NET that generates the html output for IIS based on the execution of the code/codebehind .. Do you know what the name of the part of .NET is?, and if it has any configuration settings? I know that the machine.config has a listing of browsers in it. I'm thinking theres a connection between those two things, but there are significant gaps in my understanding of how that whole thing works under the hood. So any clarification would be useful.

              J Offline
              J Offline
              Jason Weibel
              wrote on last edited by
              #6

              Now I am getting a better picture, first a clarification codebehind is the page.vb file which the page.aspx inherits from. Question, is the application written with spaghetti code like an asp app, where the vb code is in the same file as the html?

              Jason

              T 2 Replies Last reply
              0
              • J Jason Weibel

                Now I am getting a better picture, first a clarification codebehind is the page.vb file which the page.aspx inherits from. Question, is the application written with spaghetti code like an asp app, where the vb code is in the same file as the html?

                Jason

                T Offline
                T Offline
                todd 01011101
                wrote on last edited by
                #7

                No, there is no code in the page. The app was architected nicely actually. It is pretty mature now being in production usage for a couple years. So there is some drift here and there from the original architecture, but for the most part it is well done. There is no spaghetti code :) - and no code in the pages.

                1 Reply Last reply
                0
                • J Jason Weibel

                  Now I am getting a better picture, first a clarification codebehind is the page.vb file which the page.aspx inherits from. Question, is the application written with spaghetti code like an asp app, where the vb code is in the same file as the html?

                  Jason

                  T Offline
                  T Offline
                  todd 01011101
                  wrote on last edited by
                  #8

                  And yeah, by codebehind, I mean the page.aspx.vb file.

                  J 1 Reply Last reply
                  0
                  • T todd 01011101

                    And yeah, by codebehind, I mean the page.aspx.vb file.

                    J Offline
                    J Offline
                    Jason Weibel
                    wrote on last edited by
                    #9

                    Sorry Todd you have me stumped, if you discover the answer please let me know what it was – best of luck.

                    Jason

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups