我的网络服务有问题。我们没有制作网络服务,所以我们不知道真正发生了什么。起初,它可以在我们的服务器中运行,但有时它不会导致我们重新启动它。然后现在,它显示错误消息:
无法打开安全通道,因为与远程端点的安全协商失败。这可能是由于用于创建通道的 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>