Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected async Task LoginTest()
- {
- await _SignInManager.SignInAsync(new ApplicationUser()
- { UserName = "test@test.com" }, true);
- UriHelper.NavigateTo("/", true);
- }
- System.InvalidOperationException: The response headers cannot be modified because the response has already started.
- at Microsoft.AspNetCore.HttpSys.Internal.HeaderCollection.ThrowIfReadOnly()
- at Microsoft.AspNetCore.HttpSys.Internal.HeaderCollection.set_Item(String key, StringValues value)
- at Microsoft.AspNetCore.Http.Internal.ResponseCookies.Append(String key, String value, CookieOptions options)
- at Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager.AppendResponseCookie(HttpContext context, String key, String value, CookieOptions options)
- at Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler.HandleSignInAsync(ClaimsPrincipal user, AuthenticationProperties properties)
- at Microsoft.AspNetCore.Authentication.AuthenticationService.SignInAsync(HttpContext context, String scheme, ClaimsPrincipal principal, AuthenticationProperties properties)
- at Microsoft.AspNetCore.Identity.SignInManager`1.SignInWithClaimsAsync(TUser user, AuthenticationProperties authenticationProperties, IEnumerable`1 additionalClaims)
- at WebApplication3.Pages.Account.Login.RegUser() in C:UsersdavidsourcereposWebApplication3WebApplication3PagesAccountLogin.razor:line 28
- at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
- at Microsoft.AspNetCore.Components.Rendering.Renderer.GetErrorHandledTask(Task taskToHandle)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement