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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:31:07+00:00 2026-06-12T01:31:07+00:00

(Solved)[Reminder] To someone who is experiencing the same problem: If you received the same

  • 0

(Solved)[Reminder]
To someone who is experiencing the same problem:
If you received the same error message while you have got the clientaccesspolicy.xml and crossdomain.xml placed at the right folder, please check if you have accepted the self-signed certificate on the service side.

To accept a certificate: Enter the url of the service in the browser, and the browser will ask you if you want to trust it. There is also an option for installing the cert and no more warning about the certificate will be received from that site.

[Original Problem]
My silverlight application could not connect to a wcf service. Exception is thrown.

System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid.  Check InnerException for exception details. ---> System.ServiceModel.CommunicationException: An error occurred while trying to make a request to URI 'http://fyp-pc13:97/HelloWorldService/HelloWorld.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details. ---> System.Security.SecurityException ---> System.Security.SecurityException: Security error.
   at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassa.<EndGetResponse>b__9(Object sendState)
   at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__1(Object sendState)
   --- End of inner exception stack trace ---
   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
   --- End of inner exception stack trace ---
   at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
   at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
   at SilverlightApplication1.ServiceReference1.HelloServiceClient.HelloServiceClientChannel.EndHello(IAsyncResult result)
   at SilverlightApplication1.ServiceReference1.HelloServiceClient.SilverlightApplication1.ServiceReference1.IHelloService.EndHello(IAsyncResult result)
   at SilverlightApplication1.ServiceReference1.HelloServiceClient.OnEndHello(IAsyncResult result)
   at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
   --- End of inner exception stack trace ---
   at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
   at SilverlightApplication1.ServiceReference1.HelloCompletedEventArgs.get_Result()
   at SilverlightApplication1.MainPage.ialert(Object sender, HelloCompletedEventArgs msg)

The service is working perfectly fine the console app. So I guess it’s the problem of my silverlight app config.

Web.config

<?xml version="1.0"?>
<configuration>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <bindings>

      <basicHttpBinding>
        <binding name="BasicHttpBinding_IHelloService" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
            maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
            messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
            useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None" />
        </binding>
      </basicHttpBinding>

    </bindings>

    <services>
      <service name="WcfService1.HelloWorld">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IHelloService" contract="WcfService1.IHelloService" name="BasicHttpBinding_IHelloService" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>

    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>

    <serviceHostingEnvironment multipleSiteBindingsEnabled="false" />

  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>

</configuration>

ServiceReferences.ClientConfig:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IHelloService" maxBufferSize="2147483647"
                    maxReceivedMessageSize="2147483647">
                    <security mode="None" />
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://fyp-pc13:97/HelloWorldService/HelloWorld.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IHelloService"
                contract="ServiceReference1.IHelloService" name="BasicHttpBinding_IHelloService" />
        </client>
    </system.serviceModel>
</configuration>

Could anyone please help me with this issue? I have been sticking in the config file for days. Thanks a lot.

  • 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-12T01:31:08+00:00Added an answer on June 12, 2026 at 1:31 am

    This might be due to security reasons in Silverlight, your exception text gives a clue in this direction: “[…]could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, […]“

    Place a clientaccesspolicy.xml file at the root of the domain where
    the service is hosted to configure the service to allow cross-domain
    access.

    If you are using IIS, this might be the \inetpub\wwwroot\ folder, but this may vary depending on your configuration.

    This is a plain text XML file containing the following lines (might be adjusted to your needs):

    <?xml version="1.0" encoding="utf-8"?>
    <access-policy>
      <cross-domain-access>
        <policy>
          <allow-from http-request-headers="SOAPAction">
            <domain uri="*"/>
          </allow-from>
          <grant-to>
            <resource path="/" include-subpaths="true"/>
          </grant-to>
        </policy>
      </cross-domain-access>
    </access-policy>
    

    More info here: Making a Service Available Across Domain Boundaries

    [EDIT]

    If that does not work, also try putting a crossdomain.xml file to the webservice.

    Place a valid crossdomain.xml file at the root of the domain where the
    service is hosted. The file must mark the entire domain public.

    This contains the following lines:

    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
      <allow-http-request-headers-from domain="*" headers="SOAPAction,Content-Type"/>
    </cross-domain-policy>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have that xml file : <?xml version=1.0 encoding=utf-8?> <reminders> <reminder> <Title>Alarm1</Title> <Description>Desc1</Description> <Time>03/07/2012
SOLVED : The latest update solved the problem somehow. I am experiencing a very
SOLVED in the last answer im getting following error, dunno where and why? cause
@Solved The two subquestions I have created have been solved (yay for splitting this
This is not exactly a straight-out question because I have just solved it, but
I have a confusing problem in my code, in which one object gets initialized
I have reminder with a known ID, but couldn't find a solution to delete
I have a problem with css and FF3 / IE7 and Opera 10. I
Solved: i just managed to solve the problem by creating a new table and
Solved - Problem with constructor Matthew Flaschen and Michael Burr pointed out the problem

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.