Tags

, ,

Testing the app locally as a non admin authenticated user, glimpse.axd handler generates 3 redirects to the login action (did I mention it is an MVC 5 app).

an example displaying one of the redirects below:

GET http://localhost:44308/Glimpse.axd?n=glimpse_metadata&hash=eaabef1a&callback=glimpse.data.initMetadata HTTP/1.1
Host: localhost:44308
Connection: keep-alive

…..

and the redirect

HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=utf-8
Location: http://localhost:44308/Account/Login?ReturnUrl=%2FGlimpse.axd%3Fn%3Dglimpse_metadata%26hash%3Deaabef1a%26callback%3Dglimpse.data.initMetadata
….

 

after exploring the issue for about 10 minutes and enough scratching my head,

why would a login request be made when the request is already authenticated? hmmm

and all those annoying request are being made on behalf of glimpse probably via JavaScript (didn’t take my time to validate that assumption) for its front-end view; which by the way can’t be shown right now since I am logged in as a  regular user.

hmm, U know what?

as a temporary fix,  add the following 2 liners to the login action

if (Request.IsAuthenticated)
return new ContentResult();

Advertisements