asp.net - HTTP POST, Redirect from ASP .Net to JSP/ColdFusion which way is best Server Side or Client Side? -


I want to post data to another server (JSP or ColdFusion). Note: Post means that the data is also required on other servers, the browser should also be automatically redirected.

Is it better to use this form tag ... input type hidden fields, values ​​... and javascript

form.submit ();

or

  HTTP WebRequest myRequest = (HttpWebRequest) WebRequest.Create ("http: // ..."); MyRequest.CookieContainer = New System.Net.CookieContainer (10000); MyRequest.method = "Post"; MyRequest.ContentType = "application / x-www-form-urlencoded"; MyRequest.ContentLength = data.Length; Stream newstream = myRequest.GetRequestStream (); New Stream. Write (data, 0, data. Lang); NewStream.Close (); Return to my return;  

or

Should I use Web Client Class?

Please also provide points from security view.

If you want the browser to be sent to another server correctly, Client side - Your second option will send feedback from remote server to client, but any link in relative HTML will break, because users will try to request them from your server.

In addition, behind the code, you will be sending a request to your server without any cookies, headers, etc. for that site (which will not be accessible to you).

Consider other issues:

  1. Javascript may be disabled in the client.
  2. If the remote server supports SSL, you should post it on.
  3. To do this, on the client side, you will initially send all form data to the client, and then send it to the third party server.

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -