我想測試一個使用WCF Web服務的MVC應用程序。當我在VS2010中使用dev服務器運行它時,它工作正常。然而,當我在IIS7上部署和嘗試調用在我的控制器代碼中,我碰到下面的錯誤任何服務方法: (405)不允許的方法(405)方法不允許。 MVC應用程序使用WCF服務
有誰知道如何解決這個問題?
我的web配置項如下:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IAuthenticationService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://SiteName/ServiceName/AuthenticationService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IAuthenticationService"
contract="AuthService.IAuthenticationService" name="BasicHttpBinding_IAuthenticationService">
</endpoint>
</client>
</system.serviceModel>
你正在部署 - mvc應用程序,wcf,還是兩者? – 2011-06-15 05:47:23
在同一臺機器上部署兩者。 – kartikq 2011-06-15 15:06:37