Hello!
I have a SL 5 project.In the SilverlightApplication.Web I have a Silverlight-enabled WCF service, which connects to a Sharepoint and do something. (returns a byte[]) I use this as a Service Reference in my SilverlightApplication. On my local computer it works well, but not in CRM Online.
My web.config looks like this:
<?xml version="1.0"?><!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --><configuration><configSections></configSections><system.web><compilation debug="true" targetFramework="4.0" /></system.web><system.serviceModel><serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/><behaviors><serviceBehaviors><behavior name=""><serviceMetadata httpsGetEnabled="true" /><serviceDebug includeExceptionDetailInFaults="true" /></behavior><behavior name=""><serviceMetadata httpGetEnabled="true" /><serviceDebug includeExceptionDetailInFaults="true" /></behavior><behavior name="DisableServiceCertificateValidation"><serviceCredentials><clientCertificate><authentication certificateValidationMode="None" revocationMode="NoCheck"/></clientCertificate></serviceCredentials></behavior></serviceBehaviors></behaviors><bindings><customBinding><binding name="SilverlightApplication4.Web.AuthService.customBinding0" ><binaryMessageEncoding maxReadPoolSize="2147483647" maxSessionSize="2147483647" maxWritePoolSize="2147483647" /><httpsTransport maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="StreamedResponse" /></binding></customBinding></bindings><services><service name="SilverlightApplication4.Web.AuthService"><endpoint address="" binding="customBinding" bindingConfiguration="SilverlightApplication4.Web.AuthService.customBinding0" contract="SilverlightApplication4.Web.AuthService" /><endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" /></service></services><!--<behaviors><serviceBehaviors><behavior name=""><serviceMetadata httpGetEnabled="true" /><serviceDebug includeExceptionDetailInFaults="false" /></behavior></serviceBehaviors></behaviors>--><!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />--></system.serviceModel></configuration>
And my clientconfig:
<configuration><system.serviceModel><bindings><customBinding><binding name="CustomBinding_AuthService"><binaryMessageEncoding /><httpsTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" transferMode="StreamedResponse"/></binding></customBinding></bindings><client><endpoint binding="customBinding" bindingConfiguration="CustomBinding_AuthService" contract="AuthService.AuthService" name="CustomBinding_AuthService" /></client></system.serviceModel></configuration>
And the error text is: (from Fiddler)
HTTP Error 500 - Internal Server Error<?xml version="1.0"?><error xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><exception>Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.InvalidOperationException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #EE5999FBDetail: <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts"><ErrorCode>-2147220970</ErrorCode><ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" /><Message>System.InvalidOperationException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #EE5999FB</Message><Timestamp>2013-05-29T06:40:56.383069Z</Timestamp><InnerFault i:nil="true" /><TraceText i:nil="true" /></OrganizationServiceFault></exception><parameters xsi:nil="true" /><displaytitle /><displaytextencoded /><displaytext /><description>CRM Parameter Filter - Invalid parameter 'VsaVD�??urn:AuthService/TestD??w?/?%?C?m/????D,D*?D�??Vhttps://domain.crm4.dynamics.com/%7B635053590270003339%7D/WebResources/AuthService.svcV@Test' in Request.InputStream on page /Handlers/WebResource.ashx The raw request was 'POST /{635053590270003339}/WebResources/AuthService.svc' called from https://domain.crm4.dynamics.com/%7B635053590270003339%7D/WebResources/new_spsl.</description><file>Not available</file><line>Not available</line><details>Not available</details><traceInfo /><requesturl>http://domain.crm4.dynamics.com:port/Handlers/WebResource.ashx?name=AuthService.svc</requesturl><pathAndQuery>/Handlers/WebResource.ashx?name=AuthService.svc</pathAndQuery><source>ASHX_XML</source><stacktrace /></error>
Does anybody has a good idea?
Thanks and regards,
Peter