1

I have a Silverlight 5 app that gets some data from a couple Sharepoint lists. It was all working correctly, then we set up the site to allow SSL and I tried to update the service reference to call the webservice using https. It updated the client config binding to use security mode Transport. But when it calls the service it's giving an error:

System.ServiceModel.CommunicationException: An error occurred while trying to make a request to URI 'https://devlpadmin.thelittlegym.com/_vti_bin/Lists.asmx'. 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.

Does anyone know what the problem is or how to get more info than "Security error."?

xr280xr
  • 12,621
  • 7
  • 81
  • 125
  • Do you have cross domain policies set up? – Avada Kedavra Sep 17 '12 at 21:13
  • No, and I'm only partially familiar with what that is. But the Silverlight app is on a page in the SharePoint site so I don't know what domain I would put in there either. If that were the issue, would it be working without SSL? – xr280xr Sep 17 '12 at 21:58
  • I have a feeling the error message is eroneous because that's what I've read in a lot of other cases, and if I configure my ClientConfig with security mode="Transport" but an http address, I get the same error, but I think I should be getting something about expecting 'https' where 'http" is specified. – xr280xr Sep 18 '12 at 15:32
  • Glad you solved the problem. I deleted my answer since cross domain issues was obviously not the cause here. (side note: you should probably mark you answer as accepted to show that the issue is resolved.) – Avada Kedavra Sep 18 '12 at 18:46

1 Answers1

0

I've gone through so many different combinations of things that I'm not sure exactly what has happened when, but it's now working. I think originally the site/service was having some weird problem that prompted me to try to manually configure Silverlight to pass NTLM transport credentials. In doing so, I might have created an invalid config file causing the error. The configuration that is working is:

    <bindings>
        <basicHttpBinding>
            <binding name="ListsSoap" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
              <security mode="Transport" />
            </binding>
        </basicHttpBinding>
    </bindings>
    <client>
        <endpoint address="https://devadmin.mydomain.com/_vti_bin/Lists.asmx"
            binding="basicHttpBinding" bindingConfiguration="ListsSoap"
            contract="SPListsService.ListsSoap" name="ListsSoap" />
    </client>

So if you're having this error and not making a cross-domain call, suspect some kind underlying service error. If you're not using Silverlight, you can enable tracing to track down the error. If you are using Silverlight, I still don't know what can be done to narrow it down, but be aware that Silverlight only supports a fragment of the configuration options that a normal .net WCF client does.

xr280xr
  • 12,621
  • 7
  • 81
  • 125