Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6837779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:31:05+00:00 2026-05-26T23:31:05+00:00

In my Silverlight applicatin, I am using Basic Authentication to communicate with my WCF

  • 0

In my Silverlight applicatin, I am using Basic Authentication to communicate with my WCF Web Services. Everything works great, until my MediaElement attempts to request a video of a secure URL resource. I get the authentication dialog.

Ideally, I would like to include the UID/PWD in the Authorization header of the MediaElement’s request, but I do not know how to do this.

If this is not possible, how else can I restrict the access of the media element to only my application for the user logged in?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:31:05+00:00Added an answer on May 26, 2026 at 11:31 pm

    We solved this with a workaround…

    When we authenticate the user with our webservices, we add a server side HTTP only cookie for the session.

    var creds = string.Format("{0}:{1}", user.Username, user.Password);
    var bcreds = System.Text.Encoding.UTF8.GetBytes(creds);
    var base64Creds = Convert.ToBase64String(bcreds);
    
    HttpCookie httpCookie = new HttpCookie("Authorization", "Basic " + base64Creds);
    httpCookie.HttpOnly = true;
    HttpContext.Current.Response.Cookies.Add(httpCookie);
    

    Then we created a custom HttpModule to validate this cookie for access to the media files. In the custom handler we can make sure that the IP address of the request matches the session and that the request is actually coming from our Silverlight application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a RIA application using Silverlight and web services. The method of
I have a silverlight application and using WCF to communicate to the backend SQL
I'm building a site using WCF RIA services and Silverlight 4. My user database,
I am creating a basic image browsing application using Silverlight. Depending on the user's
I'm implementing a web - based application using silverlight with an SQL Server DB
I'm developing a program using Windows 7. There are WCF services (soap, rest) that
I'm using the WCF PollingDuplexHttpBinding channel to push notifications to Silverlight clients. For the
I have a Silverlight application using a WCF service hosted in IIS. I make
I have a Silverlight application that uses WCF services and also uses the Wintellect
I created simple Silverlight Application using the web site host of the VS2010 (

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.