0

我有一个 SL 5 项目。在 SilverlightApplication.Web 中,我有一个启用 Silverlight 的 WCF 服务,它连接到一个 Sharepoint 并做一些事情。(返回一个字节[])我在我的 SilverlightApplication 中使用它作为服务参考。在我的本地计算机上它运行良好,但在 CRM Online 中却不行。

我的 web.config 看起来像这样:

<?xml version="1.0"?>
<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>

我的客户端配置:

<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>

错误文本是:(来自 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: 
&lt;OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts"&gt;
&lt;ErrorCode&gt;-2147220970&lt;/ErrorCode&gt;
&lt;ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" /&gt;
&lt;Message&gt;System.InvalidOperationException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #EE5999FB&lt;/Message&gt;
&lt;Timestamp&gt;2013-05-29T06:40:56.383069Z&lt;/Timestamp&gt;
&lt;InnerFault i:nil="true" /&gt;
&lt;TraceText i:nil="true" /&gt;
&lt;/OrganizationServiceFault&gt;
</exception>
<parameters xsi:nil="true" />
<displaytitle />
<displaytextencoded />
<displaytext />
<description>CRM Parameter Filter - Invalid parameter 'V&#x2;&#xB;&#x1;s&#x4;&#xB;&#x1;a&#x6;V&#x8;D
&#x1E;&#x0;??&#x14;urn:AuthService/TestD&#x1A;??w?/?%?C?m/&#x8;????D,D*?&#x14;&#x1;D&#xC;&#x1E;&#x0;??Vhttps://nngkft.crm4.dynamics.com/%7B635053590270003339%7D/WebResources/AuthService.svc&#x1;V&#xE;@&#x4;Test&#x1;&#x1;&#x1;' in Request.InputStream on page /Handlers/WebResource.ashx
The raw request was 'POST /{635053590270003339}/WebResources/AuthService.svc' called from https://nngkft.crm4.dynamics.com/%7B635053590270003339%7D/WebResources/new_spsl.</description>
<file>Not available</file>
<line>Not available</line>
<details>Not available</details>
<traceInfo />
<requesturl>http://nngkft.crm4.dynamics.com:82/Handlers/WebResource.ashx?name=AuthService.svc</requesturl>
<pathAndQuery>/Handlers/WebResource.ashx?name=AuthService.svc</pathAndQuery>
<source>ASHX_XML</source>
<stacktrace />
</error>

有人有好主意吗?

谢谢并恭祝安康,

彼得

4

0 回答 0