I'm having an issue submitting my form (written in ASP.Net MVC) in Chrome. I have the same code on 2 servers (Dev and QA).
In my images below it looks like the ID's are being stripped out in the QA environment.
In Dev environment:
In QA environment:
This is only happening in **Chrome.** IE and Firefox work as expected in both environments. This happens on multiple machines as well.
As you can see instead of the parameters that I'm expecting I'm seeing an AuthResend parameter. It appears that all of my parameters have been stripped away and replaced.
I read a post this morning that suggested that this happens when my form is inside of a table but I checked this and it doesn't appear to be the case.
I'm using the following helper:
@using (Html.BeginForm("Rating", "EOYRating", FormMethod.Post, new { id = "submitForm" }))
{
...
}
I have a couple of partials above this call but they are fairly simple and I wouldn't expect this behavior just in one environment. Is there something specific that I'm missing or something I should be looking for?
Has anyone seen this be a code issue (environment vs environment)? Or is it most likely an environment issue?
Are there any tips or tools that can help me track this down?
If this belongs in ServerFault let me know and I'll move it.
Update:
On further review this is happening when I do a RedirectToAction
return RedirectToAction("Rating", new { teacherID = Rating.CurrentTeacher.ID, leaderID = Rating.CurrentLeader.LeaderID, IsLeader = Rating.IsLeader });
Which is going to this Action
:
public ActionResult Rating(string teacherID = "", string leaderID = "", bool IsLeader = false)
I think this happened to me before, but the difference is that my Session variable is the problem, its value in Chrome is lost and works only on IE and firefox.
Try this..
In your web.config add this:
<system.web>
<machineKey validationKey="for_key_see_link_below" decryptionKey="for_key_see_link_below" validation="SHA1" decryption="AES"/>
</system.web>
You can generate your key here.
Let me know the result.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With