AspNetCompatibilityRequirement error when hosting a WCF service with AppFabric Endpoint in SharePoint 2010 -


i trying host wcf service within sharepoint 2010 appfabric endpoint. using basichttprelaybinding. when host service standard endpoint using basichttpbinding (not service bus endpoint), service works fine. however, add endpoint using basichttprelaybinding, receive following error in event log , service not register service bus.

webhost failed process request. sender information: system.servicemodel.activation.hostedhttprequestasyncresult/58154627 exception: system.servicemodel.serviceactivationexception: service '/_vti_bin/firstservicefarmsolution/listaccessservice.svc' cannot activated due exception during compilation. exception message is: channeldispatcher @ 'sb://cliffwahl-trial.servicebus.windows.net/listaccessservice' contract(s) '"ilistaccessservice"' unable open ichannellistener.. ---> system.invalidoperationexception: channeldispatcher @ 'sb://cliffwahl-trial.servicebus.windows.net/listaccessservice' contract(s) '"ilistaccessservice"' unable open ichannellistener. ---> system.invalidoperationexception: service cannot activated because not support asp.net compatibility. asp.net compatibility enabled application. turn off asp.net compatibility mode in web.config or add aspnetcompatibilityrequirements attribute service type requirementsmode setting 'allowed' or 'required'. @ system.servicemodel.activation.aspnetcompatibilityrequirementsattribute.system.servicemodel.description.iservicebehavior.validate(servicedescription description, servicehostbase servicehostbase)

i have tried ws2007httprelaybinding , nettcprelaybinding same behavior.

here pertinent parts of code:

[servicecontract] public interface ilistaccessservice {     [operationcontract]     list<lead> getleads(); }  [basichttpbindingservicemetadataexchangeendpoint] [aspnetcompatibilityrequirements(requirementsmode = aspnetcompatibilityrequirementsmode.allowed)] public class listaccessservice : ilistaccessservice 

service file:

<%@ servicehost debug="true"              language="c#"              codebehind="listaccessservice.cs"              service="firstservicefarmsolution.code.listaccessservice, firstservicefarmsolution,version=1.0.0.0,culture=neutral,publickeytoken=625bdee8db8847ef" %> 

web config:

<configuration>      <system.servicemodel>     <services>       <clear/>       <service name="firstservicefarmsolution.code.listaccessservice"                 behaviorconfiguration="listaccessservicebehavior">         <endpoint name="basichttpendpoint"                   address=""                   binding="basichttpbinding"                   bindingconfiguration="basichttpbindingconfig"                   contract="firstservicefarmsolution.code.ilistaccessservice">           <identity>             <dns value="sp2010" />           </identity>         </endpoint>         <endpoint address="mex" binding="mexhttpbinding" contract="imetadataexchange" />         <endpoint name="relayendpoint"                    address="https://cliffwahl-trial.servicebus.windows.net/listaccessservice"                   binding="basichttprelaybinding"                   bindingconfiguration="httprelaybindingconfig"                   behaviorconfiguration="sharedsecretclientcredentials"                   contract="firstservicefarmsolution.code.ilistaccessservice" />       </service>     </services>     <bindings>       <basichttpbinding>         <binding name="basichttpbindingconfig" />       </basichttpbinding>       <basichttprelaybinding>         <binding name="httprelaybindingconfig">           <security relayclientauthenticationtype="none" mode="transport"/>         </binding>       </basichttprelaybinding>     </bindings>     <behaviors>       <servicebehaviors>         <behavior name="listaccessservicebehavior">           <servicemetadata httpgetenabled="true"/>           <servicedebug includeexceptiondetailinfaults="true" httphelppageenabled="false" httpshelppageenabled="false"/>         </behavior>       </servicebehaviors>       <endpointbehaviors>         <behavior name="sharedsecretclientcredentials">           <transportclientendpointbehavior credentialtype="sharedsecret">             <clientcredentials>               <sharedsecret issuername="<my issuer name>" issuersecret="<my issuer secret>"/>             </clientcredentials>           </transportclientendpointbehavior>           <serviceregistrysettings discoverymode="public" />         </behavior>       </endpointbehaviors>     </behaviors>         </system.servicemodel>  </configuration> 

does see issue setup or can point me sharepoint specific example of hosting wcf service service bus endpoint?

thanks, cliff


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -