1
基本WCF服務項目包括protobuf-net .dll庫。WCF protobuf-net未顯示幫助頁面
打開網頁瀏覽器並轉到localhost/wcf/service1.svc,一切正常。
現在轉到localhost/wcf/service1.svc/help,在瀏覽器控制檯(如firebug)上顯示400錯誤請求。
這裏的的web.config
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding1" messageEncoding="Mtom">
<security mode="None"></security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="Service1Behavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="protoEndpointBehavior">
<protobuf />
</behavior>
</endpointBehaviors>
</behaviors>
<extensions>
<behaviorExtensions>
<add name="protobuf" type="ProtoBuf.ServiceModel.ProtoBehaviorExtension, protobuf-net"/>
</behaviorExtensions>
</extensions>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" />
<services>
<service name="WcfService1.Service1" behaviorConfiguration="Service1Behavior">
<endpoint address="" contract="WcfService1.IService1" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding1" behaviorConfiguration="protoEndpointBehavior" />
</service>
</services>
第一個問題:在添加任何protobuf-net之前做過該網址工作 –
第二個問題:是否有任何事情記錄爲任何錯誤? –
第三個問題:您是否嘗試過擴展名的長形式?即對於v2r480,請嘗試「ProtoBuf.ServiceModel.ProtoBehaviorExtension,protobuf-net,Version = 2.0.0.480,Culture = neutral,PublicKeyToken = 257b51d87d2e4d67」' –