Html.ActionLink producing a blank href RRS feed

  • Question

  • User-1158769213 posted

    I have a site that has been working fine for a while now. I published the latest version just now, and I get a 404 whenever I try to access any page on the site.

    Looking in the source, I can see that the links generated by Html.ActionLink are of the form...

    <a href="">blah</a>

    ...where the actual link URL is blank.

    Looking around, this seems to be a routing issue. However, I haven't touched the routing on the site for a long time. Moreover, the site works fine when running in Visual Studio.

    I tried commenting out all routes except for the default one, leaving me with...

    routes.MapRoute("Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = UrlParameter.Optional });

    ...but this didn't make any difference.

    Anyone any idea what might have gone wrong? Thanks

    Monday, March 4, 2019 5:24 PM

All replies

  • User-1158769213 posted

    Turned out that it was my FTP client not uploading all of the files!

    Monday, March 4, 2019 8:24 PM
  • User1520731567 posted

    Hi Yossu,

    I'm glad that you have found the reason.

    I suggest you could mark your post as answer.

    This will help other people who faces the same issue.

    Thank you very much.

    Best Regards.

    Yuki Tao

    Tuesday, March 5, 2019 3:46 AM