ASP.NET MVC SSL POST Error
- by RyanFetz
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?