skip to Main Content

Http Post Json in VS2022 C#

I have json file. When I send it by Postman (Application) it works but in C# code I get "Bad Request" The Json File: { "name": "Token", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" }, {…

VIEW QUESTION

Adding new Entity data when user register in ASP.net

public async Task<IActionResult> OnPostAsync(string returnUrl = null) { returnUrl ??= Url.Content("~/"); ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList(); if (ModelState.IsValid) { var user = CreateUser(); await _userStore.SetUserNameAsync(user, Input.Email, CancellationToken.None); await _emailStore.SetEmailAsync(user, Input.Email, CancellationToken.None); var result = await _userManager.CreateAsync(user, Input.Password); if (result.Succeeded) { _logger.LogInformation("User…

VIEW QUESTION
Back To Top
Search