I have two websites A and B both written in ASP.NET MVC 3. In website A there is a form which needs to be submitted to website B via POST method. The user has option to post it directly or after encrypting the values.
When I submit form without encryption it is simple form.submit() and I am able to get the values in website B using FormCollection object. But when user selects submit after encryption, I redirect to another action on website A itself where encryption occurs and then this encrypted data is placed in a hidden textbox in the corresponding view and then auto submitted on page load using jQuery to website B. But now I am unable to get any values in FormCollection object on website B.
What could the problem be? Is this happening because of any security feature to prevent XSS or something similar?
Its doubtful its from XSS protections – in that case you would see an exception.
Load up fiddler and make sure you see this data in an element inside your form that is getting posted to website b. if its there in the form that is being submitted – it should be available.