I have a web application divided into some modules. One of those modules is called Authenticate
(which contains all authentication implementations of the whole application).
I have a login page which is accessed using this URL:
https://localhost:44375/Authenticate/Security/Login
Where Authenticate
is the name of the module, Security
is the controller and Login
is the action.
Inside the corresponding view, Login.cshtml
, I have this markup:
@Url.Action("Login", new { ReturnUrl = ViewBag.ReturnUrl })'
That code generates the URL this way:
/Authenticate/Authenticate/Security/Login?ReturnUrl=%2F
If I add the controller in the Url.Action
code, this way:
@Url.Action("Login", "Security", new { ReturnUrl = ViewBag.ReturnUrl })
the same happens.
How can I solve it? For some reason, the module name is duplicated in the actual URL that is created.
Thanks
Jaime