Chinaunix首页 | 论坛 | 博客
  • 博客访问: 307630
  • 博文数量: 469
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 5200
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-03 16:15
文章分类

全部博文(469)

文章存档

2011年(82)

2010年(284)

2009年(69)

2008年(34)

我的朋友

分类:

2011-01-18 10:35:35

MCTS 考试题库由我们专业IT认证讲师及产品专家精心打造,包括了当前最新的全真考试试题,全部附有正确答案。题库高达96%的覆盖率,确保考生能一次通过考试!

  经整理之后的,题库分享如下:

1.You are creating a Windows Communication Foundation (WCF) service that is implemented as follows.

(Line numbers are included for reference only.)

01|ServiceContract]

02[ServiceBehavior(includeExceptionDet¨¤ilslnFaults = true)1 03putiic class OrderService

04{

05[Operation Contract]

06putiic void Submit Order(Order an Order)

07{

O8try

09{

10...

11)

1 2catch(DivideByZeroExcepton ex)

13{

15)

16)

17)

You need to ensure that the stack trace details of the exception ae not included in the error information sent to the client.

What should you do?

A. Replace line 14 with the following line. throw:

B. Replace line 14 with the following line

throw new FaultException(anOrder, ex.ToString(fl;

C. After hne 05, add the following line.

[FaultContract(typeof(FaukEception))J

Replace line 14 with the following line

throw ex;

D. Alter hne 05, add the following line

[FaultContract(typeof(FaultException))J

Replace line 14 with the following line.

throw new FaultException(anOrder, "Divide by zero exception"):

Answer: D

2.You ae creating a Windows Communication Foundation (WCF) service that is implemented as folks.

(Line numbers are included for reference only.)

01 ?

02 03Public Class OrderService

05eCNperationCortracto>d

O6Putdic Sub Submit Order(ByVal anOrder As Order)

08Try

09.

10Catch ex As D wide By Zero Exception

12End Try

13End Sub

1 5End Class

You need to ensure that the sack trace details of the exception are not included in the error information

sent to the client. What should you do?

A. Replace line 11 with the following line. Throw

B. Replace line 11 with the following line.

Throw New FaultException(C* Order)(anOrder, exToSthng0)d

C. After line 05, add the following line.

`cFaultContract(GetType(FautException(Of Order)))>

Replace line 11 with the following line. Throw ex

D. After mne 05, add the following line.

Replace line 11 with the following line.

Throw New FaultException(CX Order)(

anOrder, "Divide by zero exception")

Answer: D

3.You are creating a windows Communication Foundation (WCF) service. You do not want to pose the

internal implementation at the service layer You ned to expose the following class as a service named

Arithmetic the an operation named Sum public class Calculator { public int Add(int

x, nty) {

)

}

Which code segment should you use?

A. [ServiceContract(Namespace="Arithmetic")J

public class Calculator

{ [Operation Contract(Action"Sum)]m

public int Add(int x, intt y)

{}

}

B. IServiceContract(ConfigurationName="Arithmetic")J

public class Calculator

{

IOperaion Contract(Action"Sum')]m

public nit Add(int x, int y)

}

}

C. [ServiceContract(Namie="Arithmetic")]

public class Calculator

(

[OperationContract(Namee"Sum)]

public int Add(int x, lnt y)

(

}

D. [ServiceContract(Namie="Arithmtic")] public class Calculator

{ (OperationContract(ReplyAction"Sum")] public int Add(int x, lit y) (

Answer: C

  如需下载更多完整的微软认证方面的题库,可登陆

阅读(455) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~