This project is read-only.

Cannot define a Route with the named parameter ?plugin=LoginModule

Dec 10, 2013 at 4:26 PM
Hey all,

i ran in the problem where I want to define a route to a view of a plugin. ASP.NET MVC 5 do not let me define a route with the named parameter ?plugin="LoginModule. I have the same problem by defining the LoginPath within the Startup.ConfigureAuth method.
        app.UseCookieAuthentication(new CookieAuthenticationOptions
            AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
            LoginPath = new PathString("/Login/Index?plugin=LoginModule") // this does not work
The MVC aplication would not start with this definition, but without the named parameter the controller cannot be found by the BundleRuntimeControllerFactory.
Does anyone know how to deal with these issues.

Best regards

Dec 11, 2013 at 2:13 AM
Please check if the LoginModule contains a LoginController and Index action.
Dec 11, 2013 at 7:40 AM
Edited Dec 11, 2013 at 7:41 AM
Hey Joey...thank you for your reply. Yes a LoginController exists within the LoginModule.
public class LoginController : Controller
    public ActionResult Index()
        return View();
The error occurs when starting the app not when accessing the LoginController. As shown in the first post the line
    LoginPath = new PathString("/Login/Index?plugin=LoginModule") // this does not work
throws an error. I can not use the ? char to define a PathString in MVC. I have the same problem with the named parameter '?plugin=LoginModule' by defining a route. Any other suggesstions are very welcome :-)
Dec 12, 2013 at 1:47 AM
Can u email your demo to me ? so that I will check it.
The doesn't has any limitation for the built in features of .net framework,
I'm supprised to your issue.

My email: