Skip to main content

Posts

Showing posts with the label Web API

Value cannot be null when trying to get WebAPI Token using Postman

Well, Server Error in '/' Application. Value cannot be null. Parameter name: value Description:  An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details:  System.ArgumentNullException: Value cannot be null. Parameter name: value Source Error: Line 431: { Line 432: AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie); Line 433: var identity = await UserManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie); Line 434: AuthenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = isPersistent }, identity); Line 435: It happened because when i created the user using Configuration Seed (i'm using EF Code First), i'm not filled the Security Stamp that is why the error occured because when the Security Stamp is null, it...