in .net5, when calling a windows-auth-based API from a blazor page results in Win32Exception: the token supplied to the function is invalid, while in .net 3.1 the same call works fine.
now click the test https button in the blazor page -> you get an exception "Win32Exception: The token supplied to the function is invalid"
when running the same test with .net core 3.1 as target framework, the call succeeds without problem, verified with a breakpoint:
additionally, it seems that switching to http instead of https also gets rid of this issue. so this seems to be only happening with https calls and .net 5 preview.
Issue Title
in .net5, when calling a windows-auth-based API from a blazor page results in Win32Exception: the token supplied to the function is invalid, while in .net 3.1 the same call works fine.
General
.net SDK 5.0.100-preview.8.20417.9 vstudio 2019 preview 2 win10 latest, iis express
i have a fairly simple test app to showcase this error:
index.razor (a blazor page to trigger an API request)
ImageController.cs (API handler)
what is happening?
run the project. access the api with a browser on https://localhost:44313/api/Image/9f3b4a7c-0d5f-41c5-aa92-b28b7aa80bf6 this works fine, the controller method is called correctly, verified with a breakpoint in debug mode.
now click the test https button in the blazor page -> you get an exception "Win32Exception: The token supplied to the function is invalid"
when running the same test with .net core 3.1 as target framework, the call succeeds without problem, verified with a breakpoint:
additionally, it seems that switching to http instead of https also gets rid of this issue. so this seems to be only happening with https calls and .net 5 preview.