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

  • Home
  • SEARCH
  • 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 135251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:45:35+00:00 2026-05-11T06:45:35+00:00

I’m making a WebPart for SharePoint that will instantiate a Silverlight UserControl and feed

  • 0

I’m making a WebPart for SharePoint that will instantiate a Silverlight UserControl and feed it some data. My problem is that when I have created my sample-WebPart and just instantiate a Silverlight control, the webpart, when added to a page or displayed in the webpart gallery, instead of rendering blank, renders an error page saying ‘File Not Found’. No clue in the logfiles to what file was not found or why this error is thrown. Here is my code:

using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.SilverlightControls;  namespace TestSLWP {   public class CustomWebPart1 : WebPart {      protected override void CreateChildControls() {       Label lblHello = new Label();       lblHello.Text = 'Hello';       Controls.Add(lblHello);       Silverlight sl = new Silverlight();     }   } } 

I’ve added references to System.Web.Extensions and System.Web.Silverlight to the project. They are in the GAC, and the webpart is written and compiled on the same computer that SharePoint resides. If I change the CreateChildControls() to be:

protected override void CreateChildControls() {   Silverlight sl = new Silverlight();   sl.ID = 'CustomWebPart1SL';   sl.Source = '/Silverlight/CustomWebPart.xap';   this.Controls.Add(sl); } 

I get the same error. Also if I remove the first slash in sl.Source I get the same error, even though the file is present in a virtual directory in the same application pool as SharePoint. I therefore, and because the error comes with just instantiating the Silverlight object, believe that the file that cannot be found is not my XAP.

What file can’t SharePoint find and what can I do about it?

Here’s the error message:

http://www.freeimagehosting.net/uploads/2dca8dbdfb.png

  • 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. 2026-05-11T06:45:36+00:00Added an answer on May 11, 2026 at 6:45 am

    Hi I found a complete walk through on how to get Silverlight web parts get running on your application: http://www.vbforums.com/archive/index.php/t-557072.html

    As you can see there are added some more things to the web.config beside your assembly registration.

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

Sidebar

Ask A Question

Stats

  • Questions 72k
  • Answers 72k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer When a browser shows an image, it is downloaded separately… May 11, 2026 at 1:47 pm
  • added an answer The suggested solution: <HTML lang='<%= PageLanguage %>'> works fine. There's… May 11, 2026 at 1:47 pm
  • added an answer What's wrong with Apache? You can set DocumentRoot to any… May 11, 2026 at 1:47 pm

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.