简体   繁体   中英

Pass value and redirect user from ASP.NET to PHP

I have a scenario here whereby, on ASP.NET server side (domain A), some data (string data) needs to be pass over to PHP server side (domain B), and then the user will be redirected from Domain A to Domain B.

Can this be done over http? Or should it be on https? Should the data be encrypted if on https?

I've read on this post

that it can be done using httpwebrequest.

should the data be pass via httpwebrequest then only response.redirect from .net to php ? Or can the httpwebrequest do the redirection?

Http and Https will depend on the data which you want to post to php. How much data is private like password or Credit Card Number etc. Similarly encryption.

Here is a question on SO about https

  1. Why not use HTTPS for everything?
  2. https://security.stackexchange.com/questions/38832/should-a-site-have-ssl-if-it-doesnt-have-a-login-form

If you want to transfer the control over another site then you should use response.redirect . You can not use httpwebrequest in this condition.

You can pass the values in the querystring or you can pass the values in the body .

Edit 1

Pass values in body using Response.Redirect

Response.Redirect with POST instead of Get?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM