欢迎来到在线考试题库网 在线考试题库官网
logo
全部科目 > 微软认证考试 > MCTS > MCTS(70-513)

单项选择题

You are developing a Windows Communication Foundation (WCF) client application.
The client application contains the following code.

[ServiceContract]
public interface ISocialStatus
{
[OperationContract]
[WebInvoke(UriTemplate = "/statuses/update.xml?status-{text}")]
void UpdateStatus(string text);
}
public class SocialClient : ClientBase, ISocialStatus
{
...
}
The configuration file contains the following lines.
binding="webHttpBinding" contract="SocialApp.ISocialStatus"
bindingConfiguration="BindingConfig" />

You need to ensure that the service is consumed.
Which code segment should you use?()

    A. var client = new SocialClient("SocialClient"); client.Endpoint.Behaviors.Add(new WebHttpBehavior());
    B. var client = new SocialClient("SocialClient"); client.Endpoint.Behaviors.Add(new WebScriptEnablingBehovior());
    C. var client = new SocialClient("POST"); client.Endpoint.Behaviors.Add(new WebHttpBehovior());
    D. var client = new SocialClient("POST"); client.Endpoint.Behaviors.Add(new WebScriptEnablingBehavior());

点击查看答案

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题