Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>OK. I fixed it. For what it worth for any future hair plugging readers, here's what I went through:</p> <p>I read the article at <a href="http://blogs.visoftinc.com/archive/2007/09/23/asp.net-ajax-updatepanel-not-working-common-problems.aspx" rel="nofollow noreferrer">http://blogs.visoftinc.com/archive/2007/09/23/asp.net-ajax-updatepanel-not-working-common-problems.aspx</a> suggested by TenaciousImpy. Interesting though it seemed, I tried setting the xhtmlConformance attribute to Transistional without any effect. I also tried validating my content with the excellent XHTML Validator Service at validator.w3.org, and even though it did feel good to get my HTML up to shape, it didn't solve my problem. I could still reproduce the error in Chrome, meaning every post back refreshed the entire page... :(</p> <p>And then by pure chance (and isn't it so often by chance we notice the cause of the most irritating bugs?) I noticed that my Authorization-logic was called on a post back that wasn't suppose to do anything like that. Yes!... Finally a clue that should quickly help me locate cause of my alopecia.</p> <p>Cutting to the chase here, it shows that, <strong>Google Chrome and Firefox, when set to remember the login-information for a specific website, send these information with every single post back</strong>. I normally send these to the server, and check for them like this:</p> <pre><code>string usern = Request["loginusername"] as string; string password = Request["loginpassword"] as string; if (!String.IsNullOrEmpty(usern) &amp;&amp; !String.IsNullOrEmpty(password)) { Authenticate(usern, password, Request["rememberme"] != null); } </code></pre> <p>Well, I checked for these parameters early in my MasterPage, and if they existed I assumed the user submitted a login request. I authenticated the user, and for ease of programming I redirected to user the same page (ie. refreshing the page in a logged-in-format and removing the login controls).</p> <p>Ergo my Timer with a tick every 30 second had its call back parameters extended with the user's login preferences, when having set Chrome or Firefox to remember your latest login and password.</p> <p>The solution was hereafter simple and obvious. I now only call my Authentication-logic for anonymous users:</p> <pre><code>if ( Session["user"] == null ) // Check parameter indicating a logged in user { string usern = Request["loginusername"] as string; string password = Request["loginpassword"] as string; if (!String.IsNullOrEmpty(usern) &amp;&amp; !String.IsNullOrEmpty(password)) { Authenticate(usern, password); } } </code></pre> <p>This allows my site to support the Login-preference memory in Chrome and Firefox.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload