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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:12:55+00:00 2026-05-15T11:12:55+00:00

The directory structure of my Silverlight project is like the following: \Bin – MainModule.xap

  • 0

The directory structure of my Silverlight project is like the following:

\Bin
- MainModule.xap
- \Images
--- Image1.png
--- Image2.png
- \Modules
--- SubModule.xap

I want to be able to run it through either a web server or through Visual Studio directly (for debugging purposes I want to bypass content downloading).

In my media loading code I do something like the following:

if (runningLocally)
{
    var bitmapImage = new BitmapImage();
    bitmapImage.UriSource = new Uri("Images/Image1.png", UriKind.Relative);
    var image = new Image();
    image.Source = bitmapImage;
}
else
{
    WebClient wc = new WebClient();
    wc.OpenReadCompleted += (s, e) =>
    {
        var bitmapImage = new BitmapImage();
        bitmapImage.SetSource(e.Result);
        var image = new Image();
        image.Source = bitmapImage;
    };
    wc.OpenReadAsync(new Uri("Images/Image1.png", UriKind.Relative));
}

This works for images but I also have sub-modules which are just assemblies housing UserControls. Since Silverlight has no ability to read disk I’ve resigned myself to the fact that I’m going to have to “download” the XAPs I need whether I’m running locally or not. Problem is if I run the project locally and try to use a WebClient to download a XAP I get an exception:

System.Net.WebException: An exception occurred during a WebClient request. ---> System.NotSupportedException: The URI prefix is not recognized.

Is there any way (WebClient or otherwise) I can get to my sub-module XAPs when running the Silverlight project directly rather than hitting a web server?

EDIT:

Forgot to mention I also tried using MEF with a DeploymentCatalog and while I don’t get an exception, nothing ever composes so I can only assuming it has the same problem.

  • 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-15T11:12:56+00:00Added an answer on May 15, 2026 at 11:12 am

    My design was trying to access files off local disk which isn’t allowed in Silverlight. I still don’t have a good answer for why you can run a Silverlight application from disk in Visual Studio and it can successfully read images/video/audio from disk however.

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

Sidebar

Related Questions

Consider the following directory structure: ROOT ------ images ............... logo.png ------ includes ............... vars.php
My directory structure looks like the following: project/ app1/ app2/ settings.py From within the
I have the following directory structure of a project: Folder project in Eclipse: --folder
My directory structure looks like the following: -xmllib -libxml++-1.0.a -main.cc ..and I issue the
I have a directory structure like this: --bin/ --lib/ --data/ So basically, the executable
Say I have a directory structure like so: /public /public/company /public/globals /public/globals/images /public/jobs /public/jobs/it
My directory structure is like this index.php , images , style, menu , header.php
I have the following directory structure on my Apache web root. I would like
I have a directory structure that looks like this: project/ __init__.py foo/ __init.py__ first.py
I have the following directory structure: /home/tichy/xxx/yyy/aaa /home/tichy/xxx/yyy/aab /home/tichy/xxx/yyy/aac I would like to enter

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.