MVC4 action only runs when debugging locally

I have an action that I use to reset the password for my users:

public class Password : Controller{
  public ActionResult Reset(string id)
  {
    //...
  }

}
id is actually the encrypted email address provided by the user when asked what email address password recovery is required for.

So, if I click "Forgot your password?" link and provide the email address user@domain.com , then the resulting URL sent to the user will look something like this:

http://www.myapp.com/admin/password/reset/euPdxABQEgE0JDuv6OHSLnk1QBYf73YseBUZwR9+MJA=

reset , . , . , ; 404 .

:

URL- http://www.myapp.com/admin/password/reset/ " ", . id (..: http://www.myapp.com/admin/password/reset/abc123), , ; 1).

, , - , . url, .

:

public override void RegisterArea(AreaRegistrationContext context)
{
   context.MapRoute(
      "Admin_default",
      "Admin/{controller}/{action}/{id}",
       new { controller = "Login", action = "Index", id = UrlParameter.Optional }
   );
}

.

?

+4
1

, - + URL-. following blog post, , , .

:

, , , String (, ?) , , .

URL:

http://www.myapp.com/admin/password/reset?id=euPdxABQEgE0JDuv6OHSLnk1QBYf73YseBUZwR9%2BMJA%3D

, url , URL-.

+4

Source: https://habr.com/ru/post/1526210/


All Articles