ASP.NET MVC SSL POST Error

Posted by RyanFetz on Stack Overflow See other posts from Stack Overflow or by RyanFetz
Published on 2010-03-22T14:58:21Z Indexed on 2010/03/22 15:01 UTC
Read the original article Hit count: 439

Filed under:
|

I have a Logon page in a MVC (1.0) application that I am securing with SSL, I have an attribute that inspects the request for the page and redirects to a https uri when it is requested with http. This all works, however when I post the form content i get the following error:

The parameters dictionary contains a null entry for parameter 'rememberMe' of non-nullable type 'System.Boolean' for method 'System.Web.Mvc.ActionResult LogOn(System.String, System.String, Boolean, System.String)' in 'DAC.US.Web.Portal.Controllers.AccountController'. To make a parameter optional its type should be either a reference type or a Nullable type. Parameter name: parameters

here is the controller code...

    //
    // GET: /Account/LogOn
    [RequiresSSL]
    public ActionResult LogOn(string ReturnUrl)
    {
        if (TempData["Message"] != null)
            ViewData["Message"] = TempData["Message"];

        TempData["Message"] = null;

        ViewData["ReturnUrl"] = ReturnUrl ?? "/Home"; 

        return View();
    }

Again, the RequireSSL Attribute works, but the POST from that SSL uri does not. What is not working?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about ssl