Internet Explorer / Edge vs. Firefox / Chrome / Opera / ...

ASP.NET Maker 2020.0.5

Editing / insertion of data sets via lookup tables

No problems when using Internet Explorer / Edge.

Mozilla Firefox / Chrome / Opera etc… require authentication?
Why and which authentication is requested here?

I normally tested using Google Chrome and never encounter any problems with authentication.

We are experiencing the same situation. Some pages work fine with no prompt or manual authentication needed and are able to get the Windows username correctly. But when an Add or Edit page uses a lookup field, Chrome prompts the user to Sign In. The user should not need to sign in, but even if I enter my username and password there it infinitely re-prompts to Sign In (or at least as many times as I try it). If I cancel the Sign In, the page can still get the username but the lookup field doesn’t work and clicking the lookup field brings up the Sign In again. In Internet Explorer and Edge, there is no Sign In prompt (as intended) and the lookup field works.

We are using Windows Authentication because we need the username, with all other authentication disabled in IIS Manager. ASP.NET Maker security is disabled. We added our server to Local Intranet sites in Internet Options, which Chrome is supposed to use. Both the database user entered on the Database page of ASP.NET Maker and my Windows user have read/write access to the database in SQL Server. We are using ASP.NET Maker v2020.0.7, Windows Server 2016, IIS 10, SQL Server 2016. Chrome says it’s the latest version, 81.0.4044.138 (Official Build) (64-bit).

To get the Windows username using .NET Core 3.1, I used “Request.HttpContext.User.Identity.Name”. The instructions to use ServerVariables do not work on .NET Core. I could not find this anywhere and had to figure it out myself. I hope this helps someone.

Looking at the IIS log files, it looks like the POST requests (which are always to //api/lookup/) return a 401 code. IE and Edge resend the request with the username and it succeeds, but Chrome is never sending the username for a POST so they fail. Chrome works as intended with GET requests, automatically resending the request with a username when it gets a 401 code.

Please search for “Configure Chrome To Allow Windows Authentication Without Prompting” for solution and see if it resolves the issue.

Thanks, we already had to do the things that most sites recommend to get Chrome to get the username. I tried a few other less common recommendations but Chrome still kept infinitely prompting to log on when using lookup or file upload fields.

I just noticed the ASP.NET Maker Advanced Setting called “Authentication mode” and changed it from “Cookie” to “Windows”. That seems to have fixed it. Now the lookup fields work properly in Chrome and it doesn’t prompt to log on.