我有一個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>