我有一个WCF服务,我已经沸腾到没有什么,因为这个错误。它把我推上了墙。这是我现在拥有的。由于“远程服务器返回一个错误:(403)禁止”与WCF服务https:
一个非常简单的WCF服务,其中一个方法返回值为“test”的字符串。
一个非常简单的Web应用程序,它使用服务并将字符串的值放入标签中。
在Win 2003上使用SSL证书运行IIS 6的Web服务器。
在同一台服务器上工作的其他WCF服务。
我发布的WCF服务,它的HTTPS位置
我运行在VS调试模式下的Web App和它完美的作品。
我发布的web应用程序是HTTPS WCF服务驻留在相同的SSL证书
我得到下在同一台服务器上的位置,“远程服务器返回错误:(403)禁止”
我几乎改变了IIS中的所有设置以及WCF和Web应用程序都无济于事。我已经比较了WCF服务中的设置,它们都是一样的。
下面是在web.config中的WCF服务和Web应用程序的设置:
它出现的问题具有与Web应用程序做的,但我的想法。任何想法:
WCF服务:
<system.serviceModel>
<bindings>
<client />
<services>
<service behaviorConfiguration="Ucf.Smtp.Wcf.SmtpServiceBehavior" name="Ucf.Smtp.Wcf.SmtpService">
<host>
<baseAddresses>
<add baseAddress="https://test.net.ucf.edu/webservices/Smtp/" />
</baseAddresses>
</host>
<endpoint address="" binding="wsHttpBinding" contract="Ucf.Smtp.Wcf.ISmtpService" bindingConfiguration="SSLBinding">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Ucf.Smtp.Wcf.SmtpServiceBehavior">
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" httpsHelpPageEnabled="True"/>
</behavior>
</serviceBehaviors>
</behaviors>
Web应用程序:
<system.serviceModel>
<bindings><wsHttpBinding>
<binding name="WSHttpBinding_ISmtpService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
establishSecurityContext="true" />
</security>
</binding>
<client>
<endpoint address="https://net228.net.ucf.edu/webservices/smtp/SmtpService.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ISmtpService"
contract="SmtpService.ISmtpService" name="WSHttpBinding_ISmtpService">
<identity>
<dns value="localhost" />
</identity>
</client>
</system.serviceModel>