BasicAuthentication超过https 400错误请求/ 409冲突的WCF服务?

时间:2013-11-05 23:12:39

标签: .net wcf ssl

整天都在工作,只是无法通过https找出我的WCF服务的web.config文件出了什么问题。跟踪日志仅说明以下内容:

无法查找频道以接收传入消息。找不到端点或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 URI不适用于此服务......

0 个答案:

没有答案