locked
Getting HTTP 404 error RRS feed

  • Question

  • Hello,

    I have a web application that I'm suddenly getting an HTTP 404 error on. There is a page in the application called "Mappings.cshtml" that looks like this:

    @model ACM.RiskAlive.Web.Features.Company.Models.MappingVM

    @{
        ViewBag.Title = "Project Mappings";
        Layout = "~/Features/Shared/PartialViews/_mainLayout.cshtml";
    }
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">Mappings</h1>
        </div>
    </div>
    <div class="row">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <div class="row">
                    <div class="col-sm-2">
                        Project: <b>@Html.DisplayTextFor(m => m.Number)</b>
                    </div>
                    <div class="col-sm-4">
                        Operator: <b>@Html.DisplayTextFor(m => m.OperatorName)</b>
                    </div>
                </div>
            </div>
            <div class="panel-body">
              @Html.Partial("~/Features/ProjectMappings/_mappingTabs.cshtml", Model?.Template)
            </div>
            <div class="panel-footer">
                <div class="row">
                    <div id="submitButtons" class="pull-right">
                        <form id="addWizardStep2" action='@Url.Action("Step2", "AddProjectWizard", Model)' method="POST">
                            <input type="submit" value="Next" class="btn btn-primary" />
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>


    I tried to add a button to the page like this:

    @model ACM.RiskAlive.Web.Features.Company.Models.MappingVM

    @{
        ViewBag.Title = "Project Mappings";
        Layout = "~/Features/Shared/PartialViews/_mainLayout.cshtml";
    }
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">Mappings</h1>
        </div>
    </div>
    <div class="row">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <div class="row">
                    <div class="col-sm-2">
                        Project: <b>@Html.DisplayTextFor(m => m.Number)</b>
                    </div>
                    <div class="col-sm-4">
                        Operator: <b>@Html.DisplayTextFor(m => m.OperatorName)</b>
                    </div>
                    <div class="col-sm-6">
                        <button id="reUploadFilesBtn" title="Re-Upload project data" class="btn btn-default btn-sm faa-parent animated-hover" disabled><i class="fa fa-upload faa-vertical text-warning"></i></button>
                    </div>
                </div>
            </div>
            <div class="panel-body">
              @Html.Partial("~/Features/ProjectMappings/_mappingTabs.cshtml", Model?.Template)
            </div>
            <div class="panel-footer">
                <div class="row">
                    <div id="submitButtons" class="pull-right">
                        <form id="addWizardStep2" action='@Url.Action("Step2", "AddProjectWizard", Model)' method="POST">
                            <input type="submit" value="Next" class="btn btn-primary" />
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    This resulted in the HTTP 404 error you see below:

    I tried undoing all my changes (in Team Explorer) and yet the error still occurs.

    One thing I noticed is that the Requested URL is /Features/AddProjectWizard/Mappings.cshtml, which is the page I was working on but it is not supposed to be the startup page. So I set my startup page to /Features/Home/Index.cshtml. Still, I get the same error, only this time it says that it can't find /Features/Home/Index.cshtml.

    What could be causing this problem? Thanks.

    • Moved by DotNet Wang Wednesday, August 17, 2016 2:06 AM
    Wednesday, August 3, 2016 4:23 PM

Answers

  • Hi gib898,

    Thank you for posting here.

    I feel the issue is related to ASP.NET. I would suggest you post the issue on here. please remember

    to close your thread by mark an useful post.  Your cooperation will be grateful.

    The Visual C# forum discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.

    If you have some grammar or code errors, please feel free to contact us. We will try our best to give you a solution.

    Best Regards,

    Hart

          

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    • Proposed as answer by Hart Wang Friday, August 5, 2016 9:11 AM
    • Marked as answer by DotNet Wang Wednesday, August 17, 2016 2:06 AM
    Friday, August 5, 2016 7:05 AM

All replies

  • MVC issues are discussed at the MVC forum.

    http://forums.asp.net/1146.aspx/1?MVC

    Wednesday, August 3, 2016 4:55 PM
  • Hi gib898,

    Thank you for posting here.

    I feel the issue is related to ASP.NET. I would suggest you post the issue on here. please remember

    to close your thread by mark an useful post.  Your cooperation will be grateful.

    The Visual C# forum discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.

    If you have some grammar or code errors, please feel free to contact us. We will try our best to give you a solution.

    Best Regards,

    Hart

          

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    • Proposed as answer by Hart Wang Friday, August 5, 2016 9:11 AM
    • Marked as answer by DotNet Wang Wednesday, August 17, 2016 2:06 AM
    Friday, August 5, 2016 7:05 AM