0

一整天都在工作,只是无法弄清楚我的 web.config 文件在 https 上的 WCF 服务有什么问题。跟踪日志仅说明以下内容:

未能查找通道以接收传入消息。未找到端点或 SOAP 操作。

<system.serviceModel>
    <!--SERVICES-->
    <diagnostics>
      <messageLogging logMalformedMessages="true" logMessagesAtTransportLevel="true" />
      <endToEndTracing activityTracing="true" />
    </diagnostics>
    <services>
      <service behaviorConfiguration="MyServiceTypeBehaviors" name="WCF.MyOwnMed.com.iosService1">
        <endpoint address="ios" binding="basicHttpBinding" bindingConfiguration="thisBasicHTTPBinding"
          name="endpointService1" contract="WCF.MyOwnMed.com.iosIService1" />
        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
      </service>
    </services>


    <!--BINDINGS-->
    <bindings>
      <basicHttpBinding>
        <binding name="thisBasicHTTPBinding" maxReceivedMessageSize="5000000" maxBufferPoolSize="5000000">
        <readerQuotas maxArrayLength="5000000" />
        <security mode="Transport"> 
             <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> 
        </security>
        </binding>
      </basicHttpBinding>
    </bindings>



    <!--BEHAVIORS -->
    <behaviors>
      <serviceBehaviors>
        <behavior name="MyServiceTypeBehaviors">
          <serviceMetadata httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>



    <protocolMapping>
      <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  </system.serviceModel>

当我使用 WCFStorm 测试服务时,我得到了我所有方法的列表。当我尝试大多数方法时,我得到:

-<GetAllDiseases>
-<MethodParameters>
-<WebException>
 <Status>ProtocolError</Status>
 <Response>System.Net.HttpWebResponse</Response>
 <Message>The remote server returned an error: (409) Conflict.</Message>
-<Data>
 <KeysAndValues attr0="KeyValuePairArray"isNull="false"/>
 </Data>
 <InnerException isNull="true"/>
 <TargetSite>System.Net.WebResponse GetResponse()</TargetSite>
 <StackTrace>at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)</StackTrace>
 <HelpLink isNull="true"/>
 <Source>System</Source>
 <HResult>-2146233079</HResult>
 </WebException>
 </MethodParameters>
 </GetAllDiseases>

这是我在尝试运行方法时得到的跟踪事件......

<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
  <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
    <EventID>262155</EventID>
    <Type>3</Type>
    <SubType Name="Error">0</SubType>
    <Level>2</Level>
    <TimeCreated SystemTime="2013-11-05T23:15:05.6916772Z"/>
    <Source Name="System.ServiceModel"/>
    <Correlation ActivityID="{2c51b91c-3b2b-4fc4-a189-d1e7b72f4034}"/>
    <Execution ProcessName="w3wp" ProcessID="3020" ThreadID="7"/>
    <Channel/>
    <Computer>WEB1</Computer>
  </System>
  <ApplicationData>
    <TraceData>
      <DataItem>
        <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error">
          <TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Channels.HttpChannelMessageReceiveFailed.aspx</TraceIdentifier>
          <Description>Failed to lookup a channel to receive an incoming message. Either the endpoint or the SOAP action was not found.</Description>
          <AppDomain>/LM/W3SVC/2/ROOT-9-130281664299064415</AppDomain>
          <Source>System.ServiceModel.Activation.HostedHttpTransportManager/33099709</Source>
          <ExtendedData xmlns="http://schemas.microsoft.com/2006/08/ServiceModel/StringTraceRecord">
            <IsRecycling>False</IsRecycling>
          </ExtendedData>
        </TraceRecord>
      </DataItem>
    </TraceData>
  </ApplicationData>
</E2ETraceEvent>

**更新 - 我注意到了,我的 WSDL 文件,位于: https ://wcf.myownmed.com/iosService1.svc?wsdl

在所有“soapAction”属性中使用“http”,这会是什么影响吗?这些是如何生成的?http URIs 不适用于此服务...

4

0 回答 0