Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSL and form values

Status
Not open for further replies.
May 8, 2004
92
0
0
GB
Hi guys,

i am having a problem...i am not using SSL for all my website rather just for one page..on that page i have this code which forces SSL to be used i.e.

Now when i submit the values for this page...all the submitted values of the form are lost :( why is this?
 
I'm not sure I follow...

You've got an HTML form that submits to an ASP script but you cannot read the Request.Form data from within your ASP ?

Is that right?

When you are on the page with the HTML form, is the URL in the address bar http or https? Or perhaps you go into https via the action property of your form?

What do you mean by this: "I have this code which forces SSL to be used" ???

If you mean to say that you redirect the submit page right back at itself with HTTPS instead of HTTP then yes, you will lose the Request.Form elements... Any redirect will do that.
 

Sheco, if that was the case couldn't you forward the Request object as well in the redirect?

 
No because the redirect commands the browser to ask for a new page. So the browser actually sends a new request... so you get the new request object.

You could pull out the form values you need and put them into a QueryString... then do the redirect with the URL + QueryString. You could stuff the values into session variables or a database. You *could* even write them to a temp file but that would be hideously bad.

You could try using Server.Transfer because it can reuse the same request... therefore preserving your form values... but the bad thing is that your old request was an HTTP request instead of a HTTPS request so that takes you back to original problem.

The best way to solve this problem is to have the original form submitted as part of an https request.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top