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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:05:36+00:00 2026-05-15T06:05:36+00:00

you will think: "This problem has been solved many, many times. So why doesn’t

  • 0

you will think: "This problem has been solved many, many times. So why doesn’t he use Google?" Please, believe me, I tried everything. I’m dealing with this problem since last week. I read many blogs and searched the MSDN. But I don’t get it.

So here is the problem. There is one Silverlight 4 app and a WCF DataService, both are running on localhost.

This is the code. Nothing special I guess.

     private void InitializeData()
        {
            var query = (from item in ObjCtx.TestTgt
                             select item) as DataServiceQuery<TestTgt>;
            Debug.Assert(query != null, "'query' is null");

            query.BeginExecute(OnLoadDataFinished, query);
        }

        private void OnLoadDataFinished(IAsyncResult ar)
        {
            try
            {
                var query = ar.AsyncState as DataServiceQuery<TestTgt>;
                Debug.Assert(query != null, "'query' is null");

                var res = query.EndExecute(ar).ToList();
                Data.Data = new ObservableCollection<TestTgt>(res);
            }
            catch(Exception ex)
            {
                Data.StateDescription = String.Format("Exception occured.{0}{0}{1}", Environment.NewLine, AgExMsgFormatter.GetExText(ex));
            }
        }

In OnLoadData at this line: var res = query.EndExecute(ar).ToList(); the following exception occures.

Exception occured.

[EXCEPTION]
[TYPE:] ‘InvalidOperationException’
[MESSAGE:] ‘An error occurred while processing this request.’
[CALLSTACK:]
at System.Data.Services.Client.BaseAsyncResult.EndExecute[T](Object source, String method, IAsyncResult asyncResult)
at System.Data.Services.Client.QueryResult.EndExecute[TElement](Object source, IAsyncResult asyncResult)
at System.Data.Services.Client.DataServiceRequest.EndExecute[TElement](Object source, DataServiceContext context, IAsyncResult asyncResult)
at System.Data.Services.Client.DataServiceQuery`1.EndExecute(IAsyncResult asyncResult)
at SimpleGrid.SimpleGridVm.OnLoadDataFinished(IAsyncResult ar)

[INNEREXCEPTION]
[TYPE:] ‘SecurityException’
[MESSAGE:] ”
[CALLSTACK:]
at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Data.Services.Http.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Data.Services.Client.QueryResult.AsyncEndGetResponse(IAsyncResult asyncResult)

[INNEREXCEPTION]
[TYPE:] ‘SecurityException’
[MESSAGE:] ‘Security error.’
[CALLSTACK:]
at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClass5.b__4(Object sendState)
at System.Net.Browser.AsyncHelper.<>c__DisplayClass2.b__0(Object sendState)
[/INNEREXCEPTION]
[/INNEREXCEPTION]
[/EXCEPTION]

As authentication mode I want to use Windows. Both are configured for this in IIS. The web service is running and is delivering the correct data.

So what am I missing? I thought that this should work. Any help would be appreciated.

Regards

  • 1 1 Answer
  • 2 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-15T06:05:37+00:00Added an answer on May 15, 2026 at 6:05 am

    Hmm, ok that’s suprising but I got it. The problem is not the authentication or something like this. It’s the debugger. The web service is not hosted on the web site of the Silverlight application. So the web service calls are failing.

    When loading the deployed site in a browser everything works absolutly fine. For me, it appears somekind of strange, but perhaps someone can give me a good explanation for this behavior.

    But this brings up another problem. How do I debug a Silverlight application, when it references an external web service. Perhaps I will open a seperate thread for this.

    Regards

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

Sidebar

Related Questions

It has been asked when MeteorJS will have auth in place... I think everyone
First I read this article I think I should use "copy" in my programe.
Do you think that C# will support something like ??= operator? Instead of this:
What do you think/use for interface layer? The backing layer will be Spring 3.
I have a small problem, which I think it will be easy for you
I have a IIS problem that I think this blog gives me a fix
QUESTION How can I detect if a user has checked the box, "prevent this
I looked at django-celery tutorial and I think it will really help me running
I think even if we will not need interoperability between applications, and even we
I think I probably know that the most common suggestion will be change the

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.