Base solution for your next web application
Open Closed

Login Problem with IE/Edge (caching issue?) #4823


User avatar
0
bomaint created

Hello,

I am experiencing a strange error when trying to log in with IE/Edge, in the UI nothing happens and when I look at the console I see a "Unexpected authenticateResult!". I put a breakpoint in "login.service.ts" inside the subscribe function of the authenticate call:

this._tokenAuthService
    .authenticate(this.authenticateModel)
    .finally(finallyCallback)
    .subscribe((result: AuthenticateResultModel) => {
    ->    this.processAuthenticateResult(result, redirectUrl);
    });

In Chrome the result is populated but in IE/Edge the result is empty (all properties are undefined). What I also saw is that in IE/Edge I see an additional GET call to <a class="postlink" href="http://localhost:22742/api/TokenAuth/Authenticate">http://localhost:22742/api/TokenAuth/Authenticate</a> with remark "(from cache)". Looking at the timings it seems as if the GET (cache) call is fired at exactly the same time as the POST call and finishes (of course if it's really from cache) before the POST returns. This would explain why the result is empty if it is taken from some unknown cached result. I checked the headers and all the headers that should prevent caching have been applied:

Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-CH, en; q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Content-Length: 153
Content-Type: application/json
Expires: Sat, 01 Jan 2000 00:00:00 GMT
Host: localhost:22742
Origin: http://localhost:4200
Pragma: no-cache
Referer: http://localhost:4200/account/login
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299
X-Requested-With: XMLHttpRequest

So why this cached GET? I am a bit lost, of course IE/Edge is the corporate default browser. Any ideas on what this could be?


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    It is fixed here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/853">https://github.com/aspnetzero/aspnet-ze ... issues/853</a>.

  • User Avatar
    0
    bomaint created

    Ok I should definitely enhance my search skill, just did a quick search on the open issues, missed the closed ones.... :(

    Thanks!