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.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
user1044169
  • 2,686
  • 6
  • 35
  • 64

1 Answers1

0

I suggest you inspect you POST with an HTTP sniffer such as Fiddler and see if the post is being sent correctly.

Sometimes you are sending the POST with an incorrect encoding and it might also cause you issues like that.

If after inspecting the POST with Fiddler and making sure you are using the correct encoding you still can´t find what's wrong I suggest you create a small piece of code that reproduces the error so we can better help you.

tucaz
  • 6,524
  • 6
  • 37
  • 60
  • I am seeing the form in Fiddler's WebForms tab, and I also see the Form fields in the breakpoint in HttpModule. The odd thing is that then I sporadically not get the Form fields in user code. More info is available at this post: http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a4986639-413a-400c-905a-dab1a199cdb7 Thanks for your help. – user1044169 Dec 18 '12 at 12:48