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 3932018
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:24:37+00:00 2026-05-19T23:24:37+00:00

I have a Silverlight 4 application that I am running embedded on a web

  • 0

I have a Silverlight 4 application that I am running embedded on a web page. I would like to allow the Silverlight client to download a settings file by doing something like:

Uri url = new Uri(@"config\settings.xml", UriKind.Relative);
WebClient client = new WebClient();
client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
client.DownloadStringAsync(url);

But ideally, I want to return a 403 Forbidden error if the user tries to access the file directly in a browser by visiting http://www.mywebsite.com/config/settings.xml

Is this possible using .htaccess?

  • 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-19T23:24:38+00:00Added an answer on May 19, 2026 at 11:24 pm

    Accessing the file from Silverlight or from a web browser looks the same to a web server, so there’s not much you can do to guarantee users won’t gain access. The best you can do is obfuscate the steps it takes to get the file.

    One thing you could do is to turn on HTTP Watch/Firebug/Wireshark and see if the Silverlight client sends any special HTTP headers identifying that it’s Silverlight making the web requests. If you can identify something unique, you can configure your web server accordingly so that only requests with that header are allowed.

    If there is no such header, another option is to use some sort of authentication. The credentials would be stored in the Silverlight client, so it wouldn’t really be that secure, but again, you’d be obfuscating how to get the file.

    You could also choose to compile the file into the client instead of accessing it over the web.

    Edit:

    It doesn’t look look like Silverlight sends any identifying headers. You could always append headers to your requests “manually” through your code.

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

Sidebar

Related Questions

I have a silverlight 2 beta 2 application that accesses a WCF web service.
I have a Silverlight application in which I would like to call a WCF
I have a silverlight application that I am embedding in an existing ASP.NET web
I have a silverlight web application that maybe open for days. It uses a
I have a Silverlight Application, that uploads file(s) to a Sharepoint Site. I got
I have created a Silverlight 4 application, that is running out of browser. As
I have a Silverlight application that is built from a set of Silverlight class
I have a Silverlight application that communications with an ASP.NET backend through WCF. I
I have a Silverlight 2 application that is consuming a WCF service. As such,
I have a Silverlight application which has on it a Canvas. On that Canvas,

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.