使用'UriTemplate'的端点不能与'System.ServiceModel.Description.WebScriptEnablingBehavior'一起使用

she*_*kar 12 wcf

在使用REST服务开发WCF时,我得到"端点使用'UriTemplate'不能与'System.ServiceModel.Description.WebScriptEnablingBehavior'"一起使用.我是WCF的新手.

小智 7

在您的web.config中,您必须将"enableWebScript"替换为"webHttp"


The*_*dge 5

简短的回答是,你不能兼得.有关详细信息,请参阅 http://kaushikghosh12.blogspot.com.au/2012/10/a-known-error-in-wcf-restful-service.html.