我想测试一个使用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