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

Dec 10, 2013 at 3: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

olaf
Coordinator
Dec 11, 2013 at 1:13 AM
Please check if the LoginModule contains a LoginController and Index action.
Dec 11, 2013 at 6:40 AM
Edited Dec 11, 2013 at 6: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 :-)
Coordinator
Dec 12, 2013 at 12:47 AM
Can u email your demo to me ? so that I will check it.
The osgi.net doesn't has any limitation for the built in features of .net framework,
I'm supprised to your issue.

My email: zhaojudi@gmail.com
Thanks.