Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am really struggling with this one. I have Google'd this and tried most of the solutions without any success.

Some background information:

I have a WPF application which consumes a WCF service. Everything works fine if the service and the application is on the same domain, but as soon as you move the application to another domain, it stops wokiring and gives the following error:

The request for security token could not be satisfied because authentication failed.

I worked through the following article: Making a Service Available Across Domain Boundaries[^], which referred to making use of some XML files, which I did, I have tried placing the XML files (clientaccesspolicy.xml and crossdomain.xml) on the IIS server - this did not make any difference (please note that I did place the files within the root of the web service)?!

I can access the web service (client side), by entering the URL in the browser as well as click on the wsdl link and view the XML, but I cannot get it working from my WPF application!

This is my client side config file content:

XML
<system.serviceModel>
    <bindings>
        <wsHttpBinding>
            <binding name="WSHttpBinding_IManagmentService" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
                messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                allowCookies="false">
                <readerQuotas maxDepth="32" maxStringContentLength="2147483647"
                    maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
                <reliableSession ordered="true" inactivityTimeout="00:10:00"
                    enabled="false" />
                <security mode="Message">
                    <transport clientCredentialType="Windows" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="Windows" negotiateServiceCredential="true"
                        algorithmSuite="Default" />
                </security>
            </binding>
        </wsHttpBinding>
    </bindings>
    <client>
        <endpoint address="http://server.local/ManagementDataProvider/ManagmentService.svc"
            binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IManagmentService"
            contract="ManagementService.IManagmentService" name="WSHttpBinding_IManagmentService">
            <identity>
                <dns value="localhost" />
            </identity>
        </endpoint>
    </client>
</system.serviceModel>


Could anyone please provide me with some information of how I can access the web service from my application.

Many thanks in advance!
Kind regards,
Posted

If you are using Windows Security for your binding (as evident from your security tag), you may have to "trust" the caller's domain with your service's domain. Alternatively, you can use a different security mode.
 
Share this answer
 
v2
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900