Weird IE Refresh Problem on ASP.Net 3.5 site - asp.net

I have a very unusual problem that actually took me quite some time to even locate the root cause. I have an ASP.Net 3.5 web application running on Windows Server 2003. I was getting reports from users that said every so often the application would refresh on its own, without user interaction. This was unusual as I have not coded any client side refreshes. After much troubleshooting I narrowed this down to an issue with Internet Explorer (both 7 & 8). FF, Chrome, and Opera do not exhibit this behavior.
Basically, this only happens the first time a user visits the site on a new instance of IE (either a new window or new tab). If the user goes to any page within the site, and then does not interact with the site again, after 6 minutes the browser refreshes! After that refresh, as long as it is the same instance of IE, no matter what page on the site you visit, and no matter how long you let it sit, you never see the refresh again. This has really baffled me, and has become a major problem as this app has data entry forms that take longer than 6 minutes to complete. Unfortunately, if the user gets caught by this refresh bug, anything they entered is lost because of the post.
I need help!! Any advice or options to try would be greatly appreciated. Thanks!
(no, I cannot require them to use a better browser as this is a corporate environment with restrictions set to use IE for non-technical users)

It's a stretch, but maybe you have a 3rd party component that's adding a meta refresh tag only for IE (see http://www.w3schools.com/tags/att_meta_http_equiv.asp (refresh value)). Or maybe there is client-side code generated somewhere only in the case of IE that puts a location.reload() or location.href = someLocation a client-side script block in your markup.
Have you compared the HTML markup in IE and and FireFox? Are they the same? That's where I would start. If they end up being the same, look at script references and search for location.reload() or location.href.
And actually maybe before that, run IE without Add Ons enabled and see if it refreshes. To run without addons, do this at the command line, "C:\Program Files\Internet Explorer\iexplore.exe" -extoff

Related

Launching SSRS Report causes browser to hang

I have a customer portal with a few reports in it. When I click a report link on the parent page to view a report, a new window opens (window.open) which contains an ASPX page, containing a reportviewer control.
The report runs (less than 30 seconds):
But then something strange occurs.
If I remain on the parent page, 15 minutes later, the browser is unresponsive. I cannot browse to any other pages on the site, I need to close and reopen the browser to continue. If I do NOT choose a report, 15 minutes later the browser is fine.
I've used network tools to see what the network calls looks like, and all I get is that a call was initiated.. nothing indicating a hung HTTP call, etc. It just.. stops.. If i browse the site immediately after running the report, it's fine! But if I hang out on the parent page after running the report (even after closing the child report window) I get the unresponsiveness.
There is a limited set of compatible browsers, especially on older versions of SQL Server SSRS. I would always recommend IE, which it looks like you are not using?
Here's the compatibility info (for SQL 2016, there's a version selector at the top of the page):
https://msdn.microsoft.com/en-us/library/ms156511.aspx#bkmk_reportviewer
Not really the solution, but finally found a more permanent fix for this. I developed a separate website that hosts my ReportViewerControl. I then developed a web form that loads with a meta refresh, after 3 seconds the page will "refresh" and redirect to my secondary ReportViewerControl website.
Something "goofy" was happening here, the session was getting locked up, almost like the more complex the report, the longer the session was locked up, the more of a chance the browser hanging. Something with the meta refresh and the secondary website causes the session to be completely disconnected (I think???)
There's probably no other person in the world that will have this issue, but if it does, at least others know my story =]

Strange double postback in asp.net because of IIS setting

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???

Chrome returns "Bad Request - Request Too Long" when navigating to local IIS Express

I have a web application that runs perfectly fine when I use the Visual Studio 2010 development server (Cassini). However when I try to use IIS Express to host the site Chrome just displays a "Bad Request - Request Too Long" error. The IIS Express site does display in other browsers (FireFox and IE9) so I'm kind of confused. The error occurs in Chrome when I try request pages in my application or even basic resources like an image, so I don't think it is an issue with URL rewriting or routing.
Just to see if the problem was somehow a result of my site's code, I created a new MVC3 website and tried running that. This worked in the VS development server, but once again produced the "Bad Request" error when running under IIS Express.
I am about to start testing the site using some mobile devices so I need to get this running under IIS. Any suggestions would be greatly appreciated.
EDIT:
The root url of the site (http://localhost:50650/) is being requested using GET. I am currently using Chrome v12.0.742.112.
I get this all the time ONLY in Chrome and I have to clear browsing data to fix it.
Wrench > Tools > Clear Browsing Data
Check the following:
Clear browsing history
Clear download history
Empty the cache
Delete cookies and other site data
Then click "Clear Browsing Data" button and refresh your page.
UPDATE:
I figured out that it has to do with writing too many cookies to the browser and that if you just close all instances of Chrome, the error goes away for a while. To prevent it, you'll need to clear out your cookies programmatically.
Instead of clearing all the cookies, just do the following:
Right click the lock in the address bar area (see picture below)
Under cookies there is a link saying how many cookies are used
Click that link
Remove all cookies in there (or just the troublesome if you can identify them)
Problem gone
This error is caused by a corrupt cookie for the website you are trying to view, so to clear it all you need to do is clear the bad cookie(s) for that website.
In Chrome, go to...
chrome://settings/cookies
(Or manually go to Settings->Advanced Settings->Privacy->Content->All Cookies and Site data)
From there, you can search for cookies that match the site you are having problems on. Finally, click "remove all" for the matching cookies.
The problem is usually that the site in question has accumulated too many cookies or created cookies which are too large, making the HTTP headers swell beyond the allowed maximum.
One-time work-around
As has been mentioned, you can go to Settings|Advanced|Content Settings|All Cookies and Site Data, search for the site in question, and delete the cookies using the X button on the right. This reduces the header size of the HTTP request when contacting the site.
Long-term work-around
In addition to removing them one-time, however, you can prevent further problems with heavy cookie sites by going to Settings|Advanced|Content Settings|Manage Exceptions, and add the base site url (e.g. "msdn.microsoft.*" without the quotes) and select Behavior as "Clear on Exit". You might have to login more often to these sites, but this should prevent the problem.
I encountered this problem when using ADB2C login from ASP.NET WebApp. In Firefox you can do similar use case to delete related coockies and problem is gone for a while. Click on HTTPS (i) lock icon with, select ">" button on the right, select More information, select Security tab, click on View Cookies and click on Remove All. Done 4 a while.
If Above methods didn't work then enter
chrome://settings/resetProfileSettings
and Click on Reset Settings
This will reset your startup page, new tab page, search engine, and pinned tabs. It will also disable all extensions and clear temporary data like cookies. Your bookmarks, history and saved passwords will not be cleared.

Every second postback on chrome is slow

i've recognized that on google chrome browser every second postback of my asp.net application is a bit slow (~1 seconds)... every other shows up immediately. internet explorer is doing fine on every postback!
someone any idea?
regards
Do you mean that when you are debuging your asp.net app using google chrome that it is running slow?
I had this problem also at one point and was to do with your host file. See this post here for a solution to his problem
https://superuser.com/questions/43823/google-chrome-is-slow-to-localhost
I've noticed that chrome frequently has connection issues, not just during debugging. I've seen this on multiple machines, different OS's. Sometimes if we just leave chrome idle for about a minute or two it will completely not respond when trying to do a post back.
After seeing the quality of a number of google's other products this appears par for the course.
Bring up the console to see if there's any weird stuff going on there. Also, view the Network tab.

IE backbutton works just once (as if browser history has just one entry)

I'm trying to fix a browser history issue. A customer of ours has a ASP.Net intranet page running for a while now. A colleague made it. Recently they asked to fix the "Back button" we made on their page (the application).
It looks at the sitemap and when clicked loads the parent page. However, in some situations I have to use "javascript:history.go(-1)". All worked fine on our test systems but when we deployed it on their test server it started to malfunctioned. We noticed that their production environment has the same problem.
Apparently all their machines (running IE) can only go back one page in the browser history. This is not intentional. We had one of their IT staff trying some other browsers and OS's. Apparently the problem (so far) only occurs when using IE. All other browsers they tested were fine. On my development system this problem doesn't occur. Also when I let someone else look at the site the problem doesn't occur either.
I have checked what their browser history length is set to and its 20 days. I tried searching here on stackoverflow but the only relevant answers concerning browser history didn't help.
How to clear browsers (IE, Firefox, Opera, Chrome) history using JavaScript or Java except from browser itself?
Also pushing the back button (the one in IE), it only works for just one page back. There is no way we can navigate more than one page back.
How can I fix this?
Server: W2k3 R2 SP2
Clients: XP I guess / IE 8 mostly
This looks very much like a local configuration problem within your customer site and therefore unlikely to be seen elsewhere, as you've proved yourself. What you need to discover is how this could be restricted and SO isn't the place for that. You might want to try posting on SuperUser for further assistance.

Resources