Pass parameters to xbap from PHP webpage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • murbarron
    New Member
    • Jun 2013
    • 1

    Pass parameters to xbap from PHP webpage

    Hello,

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

    I created a cookie.


    Code:
    $opts = array('http' => array('header'=> 'Cookie: ' . $_SESSION['FILENAME']."\r\n"));
    							$context = stream_context_create($opts);
    							$contents = file_get_contents("http://localhost/WpfBrowserApplicationUltimate.xbap", false, $context);
    							echo $contents;

    and I added

    Code:
      private void btnAbout_Click(object sender, RoutedEventArgs e)
            {
                //MessageBox.Show("RichTextPad. © 2014  University.", "About RichTextPad", MessageBoxButton.OK, MessageBoxImage.Information);
                try
                {
                    String cookie = Application.GetCookie(BrowserInteropHelper.Source);
                    MessageBox.Show(cookie);
                }
                catch (Win32Exception)
                {
                }
            }

    But the magic doesn't happen.

    Can someone clarify what am I doing wrong?

    Thanks.
Working...