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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:30:59+00:00 2026-06-04T13:30:59+00:00

Building a Silverlight 5 app that runs in the browser but getting some nagging

  • 0

Building a Silverlight 5 app that runs in the browser but getting some nagging errors that are showing up in JavaScript, they aren’t being caught by Visual Studio for some reason when the debugger is attached. I’ve done the simple stuff (create VS SL 5 project w/ a web project). When I’m debugging, the errors are showing up in the browser via JS… not in Visual Studio.

I can set breakpoints and walk through them, but when an unhandled exception happens, SL is just bubbling it up through the page (as expected), but VS isn’t catching it.

I’ve verified that VS is attached to the IE process and the Type=Silverlight. Right now the bug I’m fighting with is the nagging 4004 error code (category=managedruntimeerror) with the message of “system.argumentexception: value does not fall within the expected range” but I can’t find where that is happening w/o a stack more detail. All I get is the “Visual Studio JIT debugger” that looks very much like this http://www.scottleckie.com/2010/04/code-4004-unhandled-error-in-silverlight-application/ but his solution isn’t working for me…

  • 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-06-04T13:31:00+00:00Added an answer on June 4, 2026 at 1:31 pm

    Look in your App.xaml.cs and you will find a handler called Application_UnhandledException.

    There should be some code similar to this:

        Deployment.Current.Dispatcher.BeginInvoke(delegate
        {
            ReportErrorToDOM(e);
        });
    

    Replace it with your custom error handling method.
    The ReporErrorToDOM is what triggers the javascript error in your browser.

    If there isn’t one you need to set one up:

    public App()
    {
        this.UnhandledException += this.Application_UnhandledException;
        ...
    }
    private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
    {
        // Handle exception here
        ...
        // Don't forget this !
        e.Handled = true;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an application that is a Silverlight client application, but we've created an
I'm building a wp7 Silverlight app. I need a list that is able to
I'm building an app that generates a grid of HubTile objects from the Silverlight
This morning I tried running a Silverlight 5 App that we have been building
I'm building a silverlight app in Blend that will contain a treeview and treeviewitems.
I am building a web app in Silverlight which allows users to view and
Let me try to explain my challenge. I'm building a Silverlight app which will
I'm building some Silverlight applications in my spare time, and I wanted find some
I have been building a client / server app with Silverlight, web services, and
I am building a silverlight app and would like to add p2p capabilities -

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.