2012-07-19 90 views
0

我完全不熟悉WCF,並且創建了這些函數。 在我的本地主機完美工作,但將它放在IIS後,當我嘗試使用它時,出現errormessage 405「方法不允許」。WCF方法不允許

[ServiceContract] 
    public interface IService1 
    { 
     [WebInvoke(Method = "GET")] 
     [OperationContract] 
     string EncryptZonderPaswoord(string tekst); 

     [WebInvoke(Method = "GET")] 
     [OperationContract] 
     string EncryptMetPaswoord(string tekst, string paswoord); 

     [WebInvoke(Method = "GET")] 
     [OperationContract] 
     string DecryptZonderPaswoord(string tekst); 

     [WebInvoke(Method = "GET")] 
     [OperationContract] 
     string DecryptMetPaswoord(string tekst, string paswoord); 
    } 

...

任何人的想法?我需要在IIS上設置哪些額外屬性?

回答

0

我已經解決了我的問題。 這是我必須做的:

  • 在IIS安裝WCF .NET Framework中的服務器端
  • 寄存器架構4.0服務器端
  • :我的應用程序添加到.NET 4池,而不是默認池。