code being displayed at the top of the page
-
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.
-
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.
It sounds like the project was built in debug mode and an error occurred.
-
It sounds like the project was built in debug mode and an error occurred.
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?
-
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?
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.
-
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.
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.
-
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.
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?
-
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?
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.
-
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?
And yeah, by codebehind, I mean the page.aspx.vb file.
-
And yeah, by codebehind, I mean the page.aspx.vb file.
Sorry Todd you have me stumped, if you discover the answer please let me know what it was – best of luck.