locked
Security Exception RRS feed

  • Question

  • Hi

    I am getting the fcllowing on an async callback Running on the .net framework 4.0

     

    {System.InvalidOperationException: An error occurred while processing this request. ---> System.Security.SecurityException ---> System.Security.SecurityException: Security error.
       at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
       at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
       at System.Net.Browser.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)
       --- End of inner exception stack trace ---
       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)
       --- End of inner exception stack trace ---
       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 PMSDash.FiltersGenericModule.ViewModels.FiltersGenericViewMainViewModel.<>c__DisplayClass6.<OnloadPrintSitesDataComplete>b__3()}

     

     

    What is the most likely cause for this?

    Friday, April 9, 2010 4:15 AM

Answers

All replies

  • What is the error message? It's been thrown by the HttpWebReqeust class - outside of our client library. We may still be able to help you if you show us the error message though.

     

    Regards,

    PQ


    Peter Q. http://blogs.msdn.com/peter_qian
    Friday, April 9, 2010 8:24 AM
    Answerer
  • Hi,

    This might be a cross-domain access issue. Could you try running a network tracing tool during the repro (like fiddler - www.fiddler2.com).

    If the request goes to a different domain then the one on which the silverlight application is hosted, the target domain will need to enable cross domain access.

    Thanks,


    Vitek Karas [MSFT]
    Friday, April 9, 2010 8:45 AM
    Moderator
  • Hi all,

    i figured out that it does not work because of cross-domain access, but cross-domain access policy is enabled on the service side.
    When I call the same service within SL3 build it works. With SL4 build it does not work.


    Damir

    Thursday, April 22, 2010 12:17 PM
  • Hi Guys,

    the problem seems to be SOAPAction header in the policy file. Silverlight 4 knows, that WCD DataSErvice call is not a SOAP call :)

    I post the solution here:
    http://developers.de/blogs/damir_dobric/archive/2010/04/22/silverlight-4-invalidoperationexception-securityexception-wcf-dataservices.aspx

    Damir

     

    Thursday, April 22, 2010 1:01 PM