0

I am working on a project which is coded in ASP.NET now I need to add some PHP pages to it. But I have to pass the email address from ASP.NET to PHP page. I know its possible by using URL transfer method but its not secured as users can modify it. I need session transfer method to pass these values. Is there any direct way to do that or indirectly is it possible by using JavaScripts or jQuery or any other method?

1 Answer 1

1

Is your information being passed over http or https? It makes a big difference. You can do something such as the following without getting too complicated:

ASP.NET > update the web.config to:

cookieRequireSSL=”true”

In your asp page:

HttpCookie cookie = new HttpCookie(‘name’);
cookie.Secure = True;
cookie.Value = ‘[email protected]’;

It's also possible to do a separate session id for http (could be md5(securesessid)) and make the association in server level; Just remember not to trust an insecure sess if going back and forth.

In your php page:

<?php

session_start();

$_COOKIE['ASP.NET_SessionId'];

$cookies = getCookies();

$sessionId = $cookies['ASP.NET_SessionId'];

?>

another way is via php/soap:

var_dump($client->_cookies);

echo "cookie is ".$client->_cookies["ASP.NET_SessionId"][0];
Sign up to request clarification or add additional context in comments.

3 Comments

More information can be found here: Setting Secure Cookie Flags
Good! But this is passing value from ASP.NET page but what is the syntax to receive it in PHP page?
@dr.null - Can you please answer to this question stackoverflow.com/questions/8856894/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.