Strange double postback in asp.net because of IIS setting - asp.net

I have the follow problem. There is an asp.net application running on 5 different servers. On most of them everything is normal. Each page is doing single postback before rendering the result. On only one server we faced very strange problem. The page is rendered with the single post back, but after that, there is another second postback call even the html result is already displayed in the browser. I believe it's because of IIS configuration, but it's my first time facing such thing. Please advice if you have any idea. Always there is a solution to reinstall the fifth server but we won't know why.

Unfortunately the code is the same on all of the servers. Also they are working at same platform (windows server 2008 r2 + IIS 7.5). It could not be because of bad html syntax. The other servers work perfect. The fifth server is still not re-installed, but may be this will be the solution. We've already spent a lot of time searching for the answer, but it looks as strange as it is. I'm not sure if I successfully described it. The additional post back is not a real post back, because the html is rendered, the page is displayed, but the debugger goes one more time through the code. Otherwise nothing else happens. I wonder why the debugger will go again through the code as it won't change anything on the client side. Because on the browser side it seems as the request is finished, the result is received and everything displayed on the page. If you're not debugging it with VS, you won't find any difference - all the 5 servers looks as working equal. If the problem is not a setting in the IIS, it could be a setting in the VS, but which one and why???

Related

asp.net pages randomly lose all form data and do not postback

we've had a production application in use for about 7 years, and recently it started some strange behavior. There are a few pages where, when a user clicks a button that causes a postback and some proecessing, the browser looks like it's doing something (that is, the processing icon starts churning), but then it stops and all form data that the user enters disappears. The request never makes it to the server - I see no trace of it in the IIS logs.. no error gets written to the event log, and there are no javascript errors. It just starts and then stops. It only happens to certain users and it's not repeatable... the same user can use the same page again and it works and fails randomly. I can't reproduce the error. The browser being used is the latest Internet Explorer. I am a seasoned asp.net developer and have never seen this before.. I never ask a question in here, but this time i'm completely stumped because there is no trace of anything happening so I can't debug. Has anybody seen anything like this before?

Strange GET/POST requests in firebug

I have just started a MVC project and I faced with a very strange behavior.
When I run it it displays me some empty Home/Index
But when I go to firebug I see tens of very strange and endless requests, like this one:
GET http:// localhost :58567/3a5679dd22ba46d1993...%00101+Firefox%2F33.0&tid=7&_=1417193472430
And such the requests go one after another one and don't stop, although I don't trigger any action.
I don't understand where they come from. My app does not send any request and previously I've never faced with such the behavior. In my previous experience firebug showed me only the requests I made.
Please advise.
These requests come from the "Browser Link" feature in Visual Studio, they're not something you'll have manually added. There's more detail on the feature at http://www.asp.net/visual-studio/overview/2013/using-browser-link , including how to disable it if you don't need it.

MVC Application is hanging after the html has been rendered

I have an odd problem and would appreciate any help you can provide.
I have a .NET 4.5 MVC application that I am developing using my local IIS server.
The view that is causing the issue is a very large table that has dynamic columns as well as rows. I'm passing it a view model which includes a list for filtering.
Everything works perfectly here. I load the page, everything is rendered as it should, no problem.
The issue occurs when I try to do a post to apply filtering. The site just hangs, but if I hit 'stop' on the browser, the page will then display exactly how it should, with filtering applied. When I check Task Manager, the IIS Worker Process is sitting between 25-30% and I have to kill it to get normal performance back.
I set a breakpoint just inside the closing body and html tags which is hit on the postback, so the html is all being rendered.
Does anyone know what could cause the server to hang up after the html as been rendered? I find this very odd since I can just hit stop in firefox and the page will be displayed perfectly.

ASP.NET 2.0 website white screen of death

I am encountering a strange issue which is only affecting several users from an over 7000 user-base. Having searched the web for several hours to no avail, I'm hoping someone here can help!
I have an ASP.NET 2.0 website and when certain users try to access the home page (Default.aspx) they receive a white screen with no content loaded. This issue is occurring both in production environment and if I run the solution against a copy of production data. So I am able to replicate the exact same issue when I pseudo the problematic users.
When debugging the application in VS2005 and set a breakpoint in the code behind in the Default.aspx, the breakpoints are fired/hit so I know the request is working. The problem seems to be once the server has finished serving the request, the response back to the client/browser is empty.
Here's another strange thing I've noticed. If I alter the HTML in Default.aspx by adding a new white line or whitespace, the page will load fine for the same set of users. I thought I had resolved the issue with this fix but unfortunately the white screen issue just manifests itself once again.
Within Default.aspx, there's some AJAX requests using jQuery .load function but this can't be the issue because this functionality exists for every user of the site. The only variable is the amount of content returned within this request can vary depending on the user. But why would it resolve itself when I put a whitespace or whiteline in the page and then manifest itself hours later?
Another thing to note is it's only Default.aspx that is encountering this issue. If I browse to another page by typing in a page in the address bar, the page is served OK.
Hope someone can point me in the right direction on how I can debug or even resolve the issue.
It sounds like your ajax is the cause but without seeing some code, it's difficult to know why.
It could be a timeout, or an error that is preventing the ajax from completing it's function.
You need to use a tool like Charles or Fiddler to debug what is happening whilst the page loads whilst logged in as these users. In a nutshell, a tool like Charles will display all the detail surrounding requests made and responses served to the browser, including any failed responses.
I think it has to do with http headers, caching or encoding. But I cannot tell more without code.
Is output caching enabled for this page?
Can you give us the raw http headers for both the request and response?
If a white screen appears, will it be fixed by pressing ctrl+f5?

slow of first page, running on windows/IIS

I'm more into the LAMP stack, but I've been asked to work on a site that is running Windows and IIS 2008. I'm a beginner with IIS, so please be patient with me on this, and please ask me to provide more information if that is needed to determine.
I read the answer here (Slow first page load on asp.net site), but it seems like if I go to the site with one browser it takes long to load the first page, then fast on all other pages, then if I open up another browser, it's the same thing, so it's not something that is saved on the server, but per session?
Is there a way to have the application running at all times?
Right now it is taking 12 to 15 seconds for the first page to load.
I have access to the WebControlCenter and FTP.
I would look in the Global.asax page and see if there is anything going on when a session is started. There usually is a method in there called Session_Start that is called whenever a session is started. Also, it might have to do with the site being configured in debug mode. You can change the web.config setting to false, which has a big impact on performance.
I'm familiar with the phenomenon described in the question you've linked to, but your what you're describing does seem a bit odd.
firstly- try Jeff's suggestion and see if indeed there's something at the beginning of the session which slows it down.
If not- try answering this-
1. is the first page always slow or only on first access to it?
2. what happens if you open another tab in the browser (not a different browser)?
3. it's possibel that the page contains some heavy resources (like images, script files etc.) which are only downloaded on the first access to the page. try tracing your http responses you get and see what their sizes are.
4. try to enable trace on your web page to see the events which are taking the longest time (on aspx you need to add 'Page Trace="true"' to the page declaration)
hope one of these helps...
Have you tried a http debugger here? Lots of things could be going on here, but the fact that you get different behavior by using different browsers indicates it is probably some particular resource that is overweight.

Resources