❔ Unsupported Media Type - Razor page
{"type":"https://tools.ietf.org/html/rfc7231#section-6.5.13","title":"Unsupported Media Type","status":415,"traceId":"00-de8ff040b623653dab0b747f6f7991ff-34ebbb1f01794d2d-00"}{"type":"https://tools.ietf.org/html/rfc7231#section-6.5.13","title":"Unsupported Media Type","status":415,"traceId":"00-de8ff040b623653dab0b747f6f7991ff-34ebbb1f01794d2d-00"}The 415 (Unsupported Media Type) status code indicates that the
origin server is refusing to service the request because the payload
is in a format not supported by this method on the target resource.
The format problem might be due to the request's indicated
Content-Type or Content-Encoding, or as a result of inspecting the
data directly.The 415 (Unsupported Media Type) status code indicates that the
origin server is refusing to service the request because the payload
is in a format not supported by this method on the target resource.
The format problem might be due to the request's indicated
Content-Type or Content-Encoding, or as a result of inspecting the
data directly.I haven't run into this type of problem before.
Setting breakpoints in Visual Studio isn't triggering the breakpoints. It just shows me the first code-block provided in the browser.
Here's the "Pages/Account/Register.cshtml":
@page
@{
ViewData["Title"] = "Register";
}
@model CommunityWebsite_Lexicon_Project.Models.LoginModel
@{
<h3>Register</h3>
<form asp-action="Register" asp-controller="Account" method="post">
<div asp-validation-summary="ModelOnly"></div>
<h4>Email</h4>
<input asp-for="Email" type="email" />
<span asp-validation-for="Email"></span>
<h4>Username</h4>
<input asp-for="Username" type="text" />
<span asp-validation-for="Username"></span>
<h4>Password</h4>
<input asp-for="Password" type="password" />
<span asp-validation-for="Password"></span>
<h4>Confirm Password</h4>
<input asp-for="PasswordConfirm" type="password" />
<span asp-validation-for="PasswordConfirm"></span>
<button type="submit" value="Register">Register</button>
</form>
}
@{
if (ViewBag.Message != null)
{
<div>
@ViewBag.Message
</div>
}
}@page
@{
ViewData["Title"] = "Register";
}
@model CommunityWebsite_Lexicon_Project.Models.LoginModel
@{
<h3>Register</h3>
<form asp-action="Register" asp-controller="Account" method="post">
<div asp-validation-summary="ModelOnly"></div>
<h4>Email</h4>
<input asp-for="Email" type="email" />
<span asp-validation-for="Email"></span>
<h4>Username</h4>
<input asp-for="Username" type="text" />
<span asp-validation-for="Username"></span>
<h4>Password</h4>
<input asp-for="Password" type="password" />
<span asp-validation-for="Password"></span>
<h4>Confirm Password</h4>
<input asp-for="PasswordConfirm" type="password" />
<span asp-validation-for="PasswordConfirm"></span>
<button type="submit" value="Register">Register</button>
</form>
}
@{
if (ViewBag.Message != null)
{
<div>
@ViewBag.Message
</div>
}
}