2014-12-12 2 views
1

웹 서비스에 문제가 있습니다. 우리는 웹 서비스를 만들지 않았으므로 실제로 어떤 일이 일어나는지 알지 못합니다. 처음에는 서버에서 작동하지만 때로는 다시 시작하지 않습니다. 그런 다음 이제 오류 메시지가 표시됩니다.웹 서비스 끝점 ID 오류

원격 끝점과의 보안 협상이 실패하여 보안 채널을 열 수 없습니다. 이는 채널을 만드는 데 사용 된 EndpointAddress에 EndpointIdentity가 없거나 잘못 지정 되었기 때문일 수 있습니다. EndpointAddress가 지정하거나 묵시하는 EndpointIdentity가 원격 엔드 포인트를 올바르게 식별하는지 확인하십시오.

그러나 웹 서비스는 보안되지 않습니다. 우리의 웹 설정은 다음과 같습니다

<configuration> 
    <connectionStrings> 
    <add name="DefaultConnection" connectionString="Server=;Database=;User ID=;Password=;Trusted_Connection=False;" providerName="System.Data.SqlClient" /> 
    </connectionStrings> 
    <system.web> 
    <compilation debug="true" targetFramework="4.0" /> 
    <httpRuntime executionTimeout="3600000" maxRequestLength="102400" /> 
    </system.web> 
    <appSettings> 
    <add key="baseAddress" value="http://localhost:20088" /> 
    <add key="timeout" value="120"/> 
    <add key="provider" value="System.Data.SqlClient" /> 
    </appSettings> 
    <system.serviceModel> 
    <services> 
     <service name="H2WcfService.DataAccess" behaviorConfiguration="H2WcfServiceBehavior"> 
     <host> 
      <baseAddresses> 
      <add baseAddress="http://localhost:20088"/> 
      </baseAddresses> 
     </host> 
     <endpoint address="" binding="wsHttpBinding" contract="H2WcfService.IDataAccess" bindingConfiguration="DataAccess"> 
      <identity> 
      <dns value="localhost:20088"/> 
      </identity> 
     </endpoint> 
     <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> 
     </service> 
     <service name="H2WcfService.LoginService" behaviorConfiguration="H2WcfServiceBehavior"> 
     <host> 
      <baseAddresses> 
      <add baseAddress="http://localhost:20088"/> 
      </baseAddresses> 
     </host> 
     <endpoint address="" binding="wsHttpBinding" contract="H2WcfService.ILoginService" bindingConfiguration="Authentic"> 
      <identity> 
      <dns value="localhost:20088"/> 
      </identity> 
     </endpoint> 
     <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> 
     </service> 
     <service name="H2WcfService.LMSService" behaviorConfiguration="H2WcfServiceBehavior"> 
     <host> 
      <baseAddresses> 
      <add baseAddress="http://localhost:20088"/> 
      </baseAddresses> 
     </host> 
     <endpoint address="" binding="wsHttpBinding" contract="H2WcfService.ILMSService" bindingConfiguration="LMSService"> 
      <identity> 
      <dns value="localhost:20088"/> 
      </identity> 
     </endpoint> 
     <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="H2WcfServiceBehavior" > 
      <serviceMetadata httpGetEnabled="false" /> 
      <serviceDebug includeExceptionDetailInFaults="false" /> 
     </behavior> 
     <behavior name=""> 
      <serviceMetadata httpGetEnabled="false" /> 
      <serviceDebug includeExceptionDetailInFaults="false" /> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
    <bindings> 
     <wsHttpBinding> 
     <binding name="DataAccess" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"> 
      <security mode="None"> 
      <transport clientCredentialType="None" /> 
      <message establishSecurityContext="false" /> 
      </security> 
     </binding> 
     <binding name="Authentic"> 
      <security mode="None"> 
      <transport clientCredentialType="None" /> 
      <message establishSecurityContext="false" /> 
     </security> 
     </binding> 
     <binding name="LMSService"> 
     <security mode="None"> 
      <transport clientCredentialType="None" /> 
      <message establishSecurityContext="false" /> 
     </security> 
     </binding> 
    </wsHttpBinding> 
    </bindings> 
</system.serviceModel> 
<system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"/> 
</system.webServer> 
</configuration> 

답변

1

마지막으로 답을 찾아보십시오! 기본적으로, 내 asp.net 응용 프로그램의 web.config의는 system.serviceModel에 바인딩에서, 나는 추가해야합니다

나는 웹 서비스 인증을위한 코드로 연주했기 때문에 그것은 삭제 된
<security mode="None"/> 

. 하나님 감사합니다 여러 백업을 가지고! 고마워요! 이틀 후에 답변을 드리겠습니다.

+0

항상 좋은 점은 사용중인 바인딩에 적용 할 때와 다른 구성 등록 정보의 기본값을 확인하는 것입니다. 예를 들어,'wsHttpBinding'은'Message'의 디폴트 보안 모드를 가지고 있습니다. 반면'basicHttpBinding'은 기본 보안 모드가'None' (IIRC)이고'netTcpBinding'는'Transport'를 가지고 있습니다. 구성 (또는 코드)에 값을 지정하지 않으면 기본값이 사용됩니다. – Tim

0

보안 태그에서이

<security mode="None"> 

<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> 

<message clientCredentialType="Windows" negotiateServiceCredential="true" establishSecurityContext="true" /> 

</security> 
+0

난 당신의 솔루션을 시도했지만 아직도 오류가 발생합니다. – ezekiel

0

우리는

기존 코드

<security mode="TransportWithMessageCredential"> 
         <transport clientCredentialType="None" /> 
         <message establishSecurityContext="false" /> 
        </security> 

문제를 해결 한 새로운 코드

<security mode="TransportWithMessageCredential"> 
          <transport clientCredentialType="None" proxyCredentialType="None" 
           realm="" /> 
          <message clientCredentialType="UserName" negotiateServiceCredential="true" 
           algorithmSuite="Default" establishSecurityContext="false" /> 
         </security>