All method="post" on my website from mobiles android & ios fails (goes to 'default' Home link)

Graham Irvine 0 Reputation points
2023-05-10T14:58:01.3466667+00:00

Recently my customers have been complaining that they have not been able to register on mobile devices.

I'f I run any create or update (including 'Register new user') from a mobile device (android or apple including XCode and Android simulators) the website is simply returned to 'Home'. If I then try any of the other

If i do the same action on Safari, Chrome, Edge and Firefox it works fine.

This appears to be a mobile browser issue.

Am I alone - has anyone else found this problem?

Dotnet core 7 MVC website with MSSQL db, hosting is on AWS, Linux, Ubuntu 20, Apache providing https, with the website running in http.

Code from register, but same issue on all other submitted forms (edit & create)

using WalkLogger.web.Models.AccountViewModels
@using AspNetCore.ReCaptcha
@model RegisterViewModel
@{
    ViewData["Title"] = "App Register";
    var key = ViewData["APIKey"];
}

<h2>@ViewData["Title"]</h2>

<div class="row">
    <div class="col-sm-12 col-xs-12 col-md-8 col-lg-6 col-xl-5 col-xxl-4">
        <section>
            <form asp-route-returnUrl="@ViewData["ReturnUrl"]" method="post">
                <hr />
                <div asp-validation-summary="All" class="text-danger"></div>

                <div class="form-group">
                    <label asp-for="Comment"></label><br />
                    <label asp-for="Error" style="color:red"></label>
                </div>
                <div class="form-group">
                    <label asp-for="Result"></label>
                    <label asp-for="Result" style="color:blue"></label>
                </div>
                <hr />
                <div></div>
                <div class="form-group">
                    <label asp-for="Email"></label>
                    <input asp-for="Email" class="form-control" />
                    <span asp-validation-for="Email" class="text-danger"></span>
                </div>
                <hr />
                <div class="form-group">
                    <label asp-for="Password"></label>
                    <label style="font-style:italic; color:darkblue">Please use a strong password of more than 6 characters, UPPER and lower case, plus at least one number and one special character.</label>
                    <p></p>
                    <input asp-for="Password" class="form-control" />
                    <span asp-validation-for="Password" class="text-danger"></span>
                </div>
                <div class="form-group">
                    <label asp-for="ConfirmPassword"></label>
                    <input asp-for="ConfirmPassword" class="form-control" />
                    <span asp-validation-for="ConfirmPassword" class="text-danger"></span>
                </div>
                <hr />
                <div class="form-group">
                    <input type="checkbox" ID="chkPrivacy" required onclick="utility.validateCheckBox(this)" style="width:28px; height:28px;" />
                    <span style="vertical-align:central">
                        &nbsp;
                        Please agree to our privacy policy &nbsp;
                    </span>
                    <a href="/Home/Privacy">Privacy Policy</a>
                </div>
                <div class="form-group">
                    <input type="checkbox" ID="chkTerms" required onclick="utility.validateCheckBox(this)" style="width:28px; height:28px;" /> &nbsp;
                    <span style="vertical-align:central">
                        Please agree to our terms and conditions&nbsp;
                    </span>
                    <a href="/Home/Terms">Terms</a>
                </div>
                <hr />
                @Html.ReCaptcha("Register", "btnReCaptcha")
                <hr />
                <button type="submit" class="btn btn-success">Register</button>
        <button id="Button" type="submit" name="submit" formmethod="post" class="btn btn-secondary btn-sm">Save</button>*@
            </form>
        </section>
    </div>
</div>

@section Scripts {
    @await Html.PartialAsync("_ValidationScriptsPartial")
}


ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,308 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,386 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 59,546 Reputation points
    2023-05-10T16:07:00.1566667+00:00

    There is no issue with a form post from a mobile browser. It's probably your code. Just use the webkit remote debugger (web inspector) to see the network trace. For safari setting -> advanced -> web inspector.

    0 comments No comments