WCF Service 405 Method Not Allowed Exception

后端 未结 1 407
执念已碎
执念已碎 2021-01-03 16:40

I\'m writing a WCF service in Visual Studio 2008 to be hosted on a Windows 2008 Standard server.

I\'ve created a new Web Site in IIS7 with its own application target

相关标签:
1条回答
  • 2021-01-03 17:15

    OK, it looks like I solved the problem by adding an identity element to my web.config. Oddly enough, this hasn't been one of the answers floating around on the Internet but I stumbled across it while looking at a nearly-unrelated article. The fix goes like this:

            <service behaviorConfiguration="ConnectivityBehavior" name="EDCO.Web.Services.Connectivity">
                <endpoint address="http://validurl.net/Connectivity.svc" binding="wsHttpBinding" contract="EDCO.Web.Services.IConnectivity">
                    <identity>
                        <dns value="validurl.net" />
                    </identity>
                </endpoint>
                <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
            </service>
    
    0 讨论(0)
提交回复
热议问题