In the WCF web programming model, how can one write an operation contract with an array of query string parameters (i.e. with the same name)?

前端 未结 3 923
感情败类
感情败类 2020-12-01 08:51

Using the WCF web programming model one can specify an operation contract like so:

[OperationContract]
[WebGet(ResponseFormat = WebMessageFormat.Xml, UriTemp         


        
3条回答
  •  北荒
    北荒 (楼主)
    2020-12-01 09:05

    Be aware that in WCF 3.5 you must specify the full qualified assembly name in:

       
        
          
        
      
    

    Just like this: SampleService.CustomBehavior, SampleService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

    Otherwise you will get exception:

    Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: Invalid element in configuration. The extension name 'CustomWebHttp' is not registered in the collection at system.serviceModel/extensions/behaviorExtensions.

提交回复
热议问题