Trailing dot trouble while saving MVC 5












2














I have this model item to modify and save in MVC 5.
(.NET Framework 4.6.1)



@using (Ajax.BeginForm("Edit", new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "wrapperViews" }))
{
@Html.AntiForgeryToken()

<div class="form-horizontal">
<h4>EQUIPMENT - @ViewBag.EQP_ID</h4>
<hr />
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
@Html.HiddenFor(model => model.ID)
@Html.HiddenFor(model => model.OPERATIONID)

<div class="form-group">
@Html.LabelFor(model => model.DESCRIPTION, htmlAttributes: new { @class = "control-label col-md-4" })
<div class="col-md-8">
@Html.EditorFor(model => model.DESCRIPTION, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.DESCRIPTION, "", new { @class = "text-danger" })
</div>
</div>



<div class="form-group">
@Html.LabelFor(model => model.TYPE, htmlAttributes: new { @class = "control-label col-md-4" })
<div class="col-md-8">
@Html.DropDownListFor(model => model.TYPE,
new SelectList(Model.EquipmentTypes, "CodeType", "DescriptionType"),"", new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.TYPE, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
<div style="width:500px;margin-top:15px">
<div style="width:120px; float:left;margin-left:30px">
<input type="submit" value="Save" class="btn btn" />
</div>
<div style="width:120px; float:left;">

@Ajax.ActionLink("Back to the list", "Index", "Equipment", new { id = Model.OPERATIONID }, new AjaxOptions()
{
OnSuccess = "OpenEquipment"
})

</div>
</div>
</div>
</div>


The problem is that entity field to modify contains dot in the name, like that:



  http://localhost:62396/controllername/Edit/SUPREP.ABL


When I submit the form, it comes error



HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Detailed Error Information:
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://localhost:62396/controller/Edit/SUPREP.ABL
Physical Path C:projectnamecontrollerEditSUPREP.ABL


I tried anything I could but I didn't solved my trouble.
Any help would be appreciated.










share|improve this question



























    2














    I have this model item to modify and save in MVC 5.
    (.NET Framework 4.6.1)



    @using (Ajax.BeginForm("Edit", new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "wrapperViews" }))
    {
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
    <h4>EQUIPMENT - @ViewBag.EQP_ID</h4>
    <hr />
    @Html.ValidationSummary(true, "", new { @class = "text-danger" })
    @Html.HiddenFor(model => model.ID)
    @Html.HiddenFor(model => model.OPERATIONID)

    <div class="form-group">
    @Html.LabelFor(model => model.DESCRIPTION, htmlAttributes: new { @class = "control-label col-md-4" })
    <div class="col-md-8">
    @Html.EditorFor(model => model.DESCRIPTION, new { htmlAttributes = new { @class = "form-control" } })
    @Html.ValidationMessageFor(model => model.DESCRIPTION, "", new { @class = "text-danger" })
    </div>
    </div>



    <div class="form-group">
    @Html.LabelFor(model => model.TYPE, htmlAttributes: new { @class = "control-label col-md-4" })
    <div class="col-md-8">
    @Html.DropDownListFor(model => model.TYPE,
    new SelectList(Model.EquipmentTypes, "CodeType", "DescriptionType"),"", new { @class = "form-control" })
    @Html.ValidationMessageFor(model => model.TYPE, "", new { @class = "text-danger" })
    </div>
    </div>
    <div class="form-group">
    <div style="width:500px;margin-top:15px">
    <div style="width:120px; float:left;margin-left:30px">
    <input type="submit" value="Save" class="btn btn" />
    </div>
    <div style="width:120px; float:left;">

    @Ajax.ActionLink("Back to the list", "Index", "Equipment", new { id = Model.OPERATIONID }, new AjaxOptions()
    {
    OnSuccess = "OpenEquipment"
    })

    </div>
    </div>
    </div>
    </div>


    The problem is that entity field to modify contains dot in the name, like that:



      http://localhost:62396/controllername/Edit/SUPREP.ABL


    When I submit the form, it comes error



    HTTP Error 404.0 - Not Found
    The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

    Detailed Error Information:
    Module IIS Web Core
    Notification MapRequestHandler
    Handler StaticFile
    Error Code 0x80070002
    Requested URL http://localhost:62396/controller/Edit/SUPREP.ABL
    Physical Path C:projectnamecontrollerEditSUPREP.ABL


    I tried anything I could but I didn't solved my trouble.
    Any help would be appreciated.










    share|improve this question

























      2












      2








      2


      2





      I have this model item to modify and save in MVC 5.
      (.NET Framework 4.6.1)



      @using (Ajax.BeginForm("Edit", new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "wrapperViews" }))
      {
      @Html.AntiForgeryToken()

      <div class="form-horizontal">
      <h4>EQUIPMENT - @ViewBag.EQP_ID</h4>
      <hr />
      @Html.ValidationSummary(true, "", new { @class = "text-danger" })
      @Html.HiddenFor(model => model.ID)
      @Html.HiddenFor(model => model.OPERATIONID)

      <div class="form-group">
      @Html.LabelFor(model => model.DESCRIPTION, htmlAttributes: new { @class = "control-label col-md-4" })
      <div class="col-md-8">
      @Html.EditorFor(model => model.DESCRIPTION, new { htmlAttributes = new { @class = "form-control" } })
      @Html.ValidationMessageFor(model => model.DESCRIPTION, "", new { @class = "text-danger" })
      </div>
      </div>



      <div class="form-group">
      @Html.LabelFor(model => model.TYPE, htmlAttributes: new { @class = "control-label col-md-4" })
      <div class="col-md-8">
      @Html.DropDownListFor(model => model.TYPE,
      new SelectList(Model.EquipmentTypes, "CodeType", "DescriptionType"),"", new { @class = "form-control" })
      @Html.ValidationMessageFor(model => model.TYPE, "", new { @class = "text-danger" })
      </div>
      </div>
      <div class="form-group">
      <div style="width:500px;margin-top:15px">
      <div style="width:120px; float:left;margin-left:30px">
      <input type="submit" value="Save" class="btn btn" />
      </div>
      <div style="width:120px; float:left;">

      @Ajax.ActionLink("Back to the list", "Index", "Equipment", new { id = Model.OPERATIONID }, new AjaxOptions()
      {
      OnSuccess = "OpenEquipment"
      })

      </div>
      </div>
      </div>
      </div>


      The problem is that entity field to modify contains dot in the name, like that:



        http://localhost:62396/controllername/Edit/SUPREP.ABL


      When I submit the form, it comes error



      HTTP Error 404.0 - Not Found
      The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

      Detailed Error Information:
      Module IIS Web Core
      Notification MapRequestHandler
      Handler StaticFile
      Error Code 0x80070002
      Requested URL http://localhost:62396/controller/Edit/SUPREP.ABL
      Physical Path C:projectnamecontrollerEditSUPREP.ABL


      I tried anything I could but I didn't solved my trouble.
      Any help would be appreciated.










      share|improve this question













      I have this model item to modify and save in MVC 5.
      (.NET Framework 4.6.1)



      @using (Ajax.BeginForm("Edit", new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "wrapperViews" }))
      {
      @Html.AntiForgeryToken()

      <div class="form-horizontal">
      <h4>EQUIPMENT - @ViewBag.EQP_ID</h4>
      <hr />
      @Html.ValidationSummary(true, "", new { @class = "text-danger" })
      @Html.HiddenFor(model => model.ID)
      @Html.HiddenFor(model => model.OPERATIONID)

      <div class="form-group">
      @Html.LabelFor(model => model.DESCRIPTION, htmlAttributes: new { @class = "control-label col-md-4" })
      <div class="col-md-8">
      @Html.EditorFor(model => model.DESCRIPTION, new { htmlAttributes = new { @class = "form-control" } })
      @Html.ValidationMessageFor(model => model.DESCRIPTION, "", new { @class = "text-danger" })
      </div>
      </div>



      <div class="form-group">
      @Html.LabelFor(model => model.TYPE, htmlAttributes: new { @class = "control-label col-md-4" })
      <div class="col-md-8">
      @Html.DropDownListFor(model => model.TYPE,
      new SelectList(Model.EquipmentTypes, "CodeType", "DescriptionType"),"", new { @class = "form-control" })
      @Html.ValidationMessageFor(model => model.TYPE, "", new { @class = "text-danger" })
      </div>
      </div>
      <div class="form-group">
      <div style="width:500px;margin-top:15px">
      <div style="width:120px; float:left;margin-left:30px">
      <input type="submit" value="Save" class="btn btn" />
      </div>
      <div style="width:120px; float:left;">

      @Ajax.ActionLink("Back to the list", "Index", "Equipment", new { id = Model.OPERATIONID }, new AjaxOptions()
      {
      OnSuccess = "OpenEquipment"
      })

      </div>
      </div>
      </div>
      </div>


      The problem is that entity field to modify contains dot in the name, like that:



        http://localhost:62396/controllername/Edit/SUPREP.ABL


      When I submit the form, it comes error



      HTTP Error 404.0 - Not Found
      The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

      Detailed Error Information:
      Module IIS Web Core
      Notification MapRequestHandler
      Handler StaticFile
      Error Code 0x80070002
      Requested URL http://localhost:62396/controller/Edit/SUPREP.ABL
      Physical Path C:projectnamecontrollerEditSUPREP.ABL


      I tried anything I could but I didn't solved my trouble.
      Any help would be appreciated.







      entity-framework asp.net-mvc-5






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 19 '18 at 16:42









      Riddick

      456




      456
























          2 Answers
          2






          active

          oldest

          votes


















          2














          Just Solved. Need to add to RouteConfig.cs the following line:



          routes.AppendTrailingSlash = true;


          And everything works. Thank you.






          share|improve this answer





























            0














            The problem is with your URL. IIS thinks that you're requesting for a file with extension ".ABL". You can simply add a trailing / to make it act like a route.



            e.g.: http://localhost:62396/controllername/Edit/SUPREP.ABL/



            Also make sure you've enabled double escaping by adding this to web.config :



            <security>
            <requestFiltering allowDoubleEscaping="true"/>
            </security>





            share|improve this answer























            • Yes, that's what I am trying to do but I don't know how to intercept the Url and add the the trailing. I have just submit button. How do I do ?
              – Riddick
              Nov 19 '18 at 16:58










            • @Riddick, you also need to enable double escaping. I've updated my answer, have a look.
              – chaosifier
              Nov 19 '18 at 17:07










            • Thanks, but I still don't know how to add the trailing.
              – Riddick
              Nov 19 '18 at 17:14










            • @Riddick, what error are you getting now?
              – chaosifier
              Nov 19 '18 at 17:19










            • Here I am again. I just solved. The solution is to add to RouteConfig.cs the line routes.AppendTrailingSlash = true; and even security tag you told me is not necessary. Anyway, thank you for helping me find solution.
              – Riddick
              Nov 19 '18 at 17:26











            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53379132%2ftrailing-dot-trouble-while-saving-mvc-5%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            Just Solved. Need to add to RouteConfig.cs the following line:



            routes.AppendTrailingSlash = true;


            And everything works. Thank you.






            share|improve this answer


























              2














              Just Solved. Need to add to RouteConfig.cs the following line:



              routes.AppendTrailingSlash = true;


              And everything works. Thank you.






              share|improve this answer
























                2












                2








                2






                Just Solved. Need to add to RouteConfig.cs the following line:



                routes.AppendTrailingSlash = true;


                And everything works. Thank you.






                share|improve this answer












                Just Solved. Need to add to RouteConfig.cs the following line:



                routes.AppendTrailingSlash = true;


                And everything works. Thank you.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 19 '18 at 17:27









                Riddick

                456




                456

























                    0














                    The problem is with your URL. IIS thinks that you're requesting for a file with extension ".ABL". You can simply add a trailing / to make it act like a route.



                    e.g.: http://localhost:62396/controllername/Edit/SUPREP.ABL/



                    Also make sure you've enabled double escaping by adding this to web.config :



                    <security>
                    <requestFiltering allowDoubleEscaping="true"/>
                    </security>





                    share|improve this answer























                    • Yes, that's what I am trying to do but I don't know how to intercept the Url and add the the trailing. I have just submit button. How do I do ?
                      – Riddick
                      Nov 19 '18 at 16:58










                    • @Riddick, you also need to enable double escaping. I've updated my answer, have a look.
                      – chaosifier
                      Nov 19 '18 at 17:07










                    • Thanks, but I still don't know how to add the trailing.
                      – Riddick
                      Nov 19 '18 at 17:14










                    • @Riddick, what error are you getting now?
                      – chaosifier
                      Nov 19 '18 at 17:19










                    • Here I am again. I just solved. The solution is to add to RouteConfig.cs the line routes.AppendTrailingSlash = true; and even security tag you told me is not necessary. Anyway, thank you for helping me find solution.
                      – Riddick
                      Nov 19 '18 at 17:26
















                    0














                    The problem is with your URL. IIS thinks that you're requesting for a file with extension ".ABL". You can simply add a trailing / to make it act like a route.



                    e.g.: http://localhost:62396/controllername/Edit/SUPREP.ABL/



                    Also make sure you've enabled double escaping by adding this to web.config :



                    <security>
                    <requestFiltering allowDoubleEscaping="true"/>
                    </security>





                    share|improve this answer























                    • Yes, that's what I am trying to do but I don't know how to intercept the Url and add the the trailing. I have just submit button. How do I do ?
                      – Riddick
                      Nov 19 '18 at 16:58










                    • @Riddick, you also need to enable double escaping. I've updated my answer, have a look.
                      – chaosifier
                      Nov 19 '18 at 17:07










                    • Thanks, but I still don't know how to add the trailing.
                      – Riddick
                      Nov 19 '18 at 17:14










                    • @Riddick, what error are you getting now?
                      – chaosifier
                      Nov 19 '18 at 17:19










                    • Here I am again. I just solved. The solution is to add to RouteConfig.cs the line routes.AppendTrailingSlash = true; and even security tag you told me is not necessary. Anyway, thank you for helping me find solution.
                      – Riddick
                      Nov 19 '18 at 17:26














                    0












                    0








                    0






                    The problem is with your URL. IIS thinks that you're requesting for a file with extension ".ABL". You can simply add a trailing / to make it act like a route.



                    e.g.: http://localhost:62396/controllername/Edit/SUPREP.ABL/



                    Also make sure you've enabled double escaping by adding this to web.config :



                    <security>
                    <requestFiltering allowDoubleEscaping="true"/>
                    </security>





                    share|improve this answer














                    The problem is with your URL. IIS thinks that you're requesting for a file with extension ".ABL". You can simply add a trailing / to make it act like a route.



                    e.g.: http://localhost:62396/controllername/Edit/SUPREP.ABL/



                    Also make sure you've enabled double escaping by adding this to web.config :



                    <security>
                    <requestFiltering allowDoubleEscaping="true"/>
                    </security>






                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Nov 19 '18 at 17:06

























                    answered Nov 19 '18 at 16:51









                    chaosifier

                    875726




                    875726












                    • Yes, that's what I am trying to do but I don't know how to intercept the Url and add the the trailing. I have just submit button. How do I do ?
                      – Riddick
                      Nov 19 '18 at 16:58










                    • @Riddick, you also need to enable double escaping. I've updated my answer, have a look.
                      – chaosifier
                      Nov 19 '18 at 17:07










                    • Thanks, but I still don't know how to add the trailing.
                      – Riddick
                      Nov 19 '18 at 17:14










                    • @Riddick, what error are you getting now?
                      – chaosifier
                      Nov 19 '18 at 17:19










                    • Here I am again. I just solved. The solution is to add to RouteConfig.cs the line routes.AppendTrailingSlash = true; and even security tag you told me is not necessary. Anyway, thank you for helping me find solution.
                      – Riddick
                      Nov 19 '18 at 17:26


















                    • Yes, that's what I am trying to do but I don't know how to intercept the Url and add the the trailing. I have just submit button. How do I do ?
                      – Riddick
                      Nov 19 '18 at 16:58










                    • @Riddick, you also need to enable double escaping. I've updated my answer, have a look.
                      – chaosifier
                      Nov 19 '18 at 17:07










                    • Thanks, but I still don't know how to add the trailing.
                      – Riddick
                      Nov 19 '18 at 17:14










                    • @Riddick, what error are you getting now?
                      – chaosifier
                      Nov 19 '18 at 17:19










                    • Here I am again. I just solved. The solution is to add to RouteConfig.cs the line routes.AppendTrailingSlash = true; and even security tag you told me is not necessary. Anyway, thank you for helping me find solution.
                      – Riddick
                      Nov 19 '18 at 17:26
















                    Yes, that's what I am trying to do but I don't know how to intercept the Url and add the the trailing. I have just submit button. How do I do ?
                    – Riddick
                    Nov 19 '18 at 16:58




                    Yes, that's what I am trying to do but I don't know how to intercept the Url and add the the trailing. I have just submit button. How do I do ?
                    – Riddick
                    Nov 19 '18 at 16:58












                    @Riddick, you also need to enable double escaping. I've updated my answer, have a look.
                    – chaosifier
                    Nov 19 '18 at 17:07




                    @Riddick, you also need to enable double escaping. I've updated my answer, have a look.
                    – chaosifier
                    Nov 19 '18 at 17:07












                    Thanks, but I still don't know how to add the trailing.
                    – Riddick
                    Nov 19 '18 at 17:14




                    Thanks, but I still don't know how to add the trailing.
                    – Riddick
                    Nov 19 '18 at 17:14












                    @Riddick, what error are you getting now?
                    – chaosifier
                    Nov 19 '18 at 17:19




                    @Riddick, what error are you getting now?
                    – chaosifier
                    Nov 19 '18 at 17:19












                    Here I am again. I just solved. The solution is to add to RouteConfig.cs the line routes.AppendTrailingSlash = true; and even security tag you told me is not necessary. Anyway, thank you for helping me find solution.
                    – Riddick
                    Nov 19 '18 at 17:26




                    Here I am again. I just solved. The solution is to add to RouteConfig.cs the line routes.AppendTrailingSlash = true; and even security tag you told me is not necessary. Anyway, thank you for helping me find solution.
                    – Riddick
                    Nov 19 '18 at 17:26


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53379132%2ftrailing-dot-trouble-while-saving-mvc-5%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    'app-layout' is not a known element: how to share Component with different Modules

                    android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

                    WPF add header to Image with URL pettitions [duplicate]