By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,899 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,899 IT Pros & Developers. It's quick & easy.

Pass parameters to xbap from PHP webpage

P: 1
Hello,

I have a PHP webpage and I want to pass my session to my XBAP app.

I created a cookie.


Expand|Select|Wrap|Line Numbers
  1. $opts = array('http' => array('header'=> 'Cookie: ' . $_SESSION['FILENAME']."\r\n"));
  2.                             $context = stream_context_create($opts);
  3.                             $contents = file_get_contents("http://localhost/WpfBrowserApplicationUltimate.xbap", false, $context);
  4.                             echo $contents;

and I added

Expand|Select|Wrap|Line Numbers
  1.   private void btnAbout_Click(object sender, RoutedEventArgs e)
  2.         {
  3.             //MessageBox.Show("RichTextPad.  2014  University.", "About RichTextPad", MessageBoxButton.OK, MessageBoxImage.Information);
  4.             try
  5.             {
  6.                 String cookie = Application.GetCookie(BrowserInteropHelper.Source);
  7.                 MessageBox.Show(cookie);
  8.             }
  9.             catch (Win32Exception)
  10.             {
  11.             }
  12.         }    

But the magic doesn't happen.

Can someone clarify what am I doing wrong?

Thanks.
Jun 24 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.