Working with Cookies

May 27, 2010 at 4:45 PM

The encoder that we are using requires a login and so I have to maintain the cookie while I'm connected.  When I login I retrieve the cookiecollection and store it and then I'm trying to send it back using the following code.  I tried both media element and MediaPlayerCore which is the actual CoreSmoothStreamingMediaElement.  Neither seem to work.

MediaPlayer.MediaElement.CookieContainer = new CookieContainer();
            MediaPlayer.MediaElement.CookieContainer.Add(new Uri(""), _UserLogin.UserCookies);
            MediaPlayerCore.CookieContainer = new CookieContainer();
            MediaPlayerCore.CookieContainer.Add(new Uri(""), _UserLogin.UserCookies);
            MediaPlayer.MediaElement.SmoothStreamingSource = new Uri("");
            MediaPlayer.MediaElement.AutoPlay = true;

UserCookies is a CookieCollection that contains the correct cookie, but when inspecting the network traffic with wireshark the cookie is not being set in the http get of the manifest and so I keep getting a 401

Thanks for any help.