0

I have ASP.NET MVC 4. Just recently I upgraded to .NET Framework 4.5, VS 2012, and I believe it also upgraded IIS express to version 8.

Now that I upgraded, my application looses POST data. In one of my WCF components I look into HttpContext.Current.Request.Form -- it now gives me 0 fields, while I expect 4 fields. For troubleshooting, I added HttpModule with an empty body, and if I break on BeginRequest, I consistently can see all my form fields in HttpContext.Current.Request.Form from HttpModule, but when I hit F5, I sometimes get the Form fields in the component and sometimes the Forms objects is empty.

Sounds like some kind of race condition inside of ASP.NET, MVC or something.

I am at a loss.

4

1 回答 1

0

我建议您使用 HTTP 嗅探器(例如Fiddler )检查您的 POST,看看是否正确发送了帖子。

有时您发送的 POST 编码不正确,它也可能会导致您出现类似的问题。

如果在使用 Fiddler 检查 POST 并确保您使用正确的编码后,您仍然找不到问题所在,我建议您创建一小段代码来重现错误,以便我们更好地帮助您。

于 2012-12-18T12:35:55.507 回答