首页 > Microsoft > MCTS > 70-529

MS.NET Framework 2.0 - Distributed Appl Development:70-529

科目编号:70-529

科目名称:MS.NET Framework 2.0 - Distributed Appl Development

描述:
70-529 考试是 Microsoft 公司的 MS.NET Framework 2.0 - Distributed Appl Development 认证考试官方代号,kaoccna 的 70-529 权威考试题库软件是 Microsoft 认证厂商的授权产品,kaoccna 绝对保证顺利通过,否则承诺全额退款!
MS.NET Framework 2.0 - Distributed Appl Development 认证作为全球IT领域专家 Microsoft 热门认证之一,是许多大中 IT 企业选择人才标准的必备条件。 如果你正在准备 70-529 考试,为 Microsoft MS.NET Framework 2.0 - Distributed Appl Development认证做最后冲刺,又苦于没有绝对权威的考试真题模拟

    mcsepass 实行"一次不过全额退款"承诺。如果您购买我们 70-529 的考题,只要不是首次通过,凭盖有 PROMETRIC 或 VUE 考试中心钢印的考试成绩单,我们将退还您购买 70-529 考题大师的全部费用,绝对保证您的利益不受到任何的损失。

70-529
  • 科目: 70-529
  • 原价: ¥ 462.00
  • 现价: ¥ 358.00

kaoccna 的优势

70-529 试题的质量和价值
mcsepass 模拟测试题具有最高的专业技术含量,只供具有相关专业知识的专家和学者学习和研究之用。
100% 保证您通过 70-529 的考试
如果你使用 mcsepass 模拟测试,我们将保证你的第一次参加考试即取得成功,否则,我们将全额退款!
试用后再购买
mcsepass 提供每种产品免费测试。在您决定购买之前,请检测联接,可能存在的问题及试题质量和适用性。
kaoccna认证考试题库网专业提供 Microsoft 70-529 最新题库下载,完全覆盖 mcsepass 考试原题。

部分考题展示

 
 
Exam : Microsoft 70-529
Title : MS.NET Framework 2.0 - Distributed Appl Development


1. A file named Util.asmx contains the following code segment. (Line numbers are included for reference only.)01 <%@ WebService Language="C#" class="Exam.Util" %>02 namespace Exam {03 public class Util {04 public string GetData() {05 return "data";06 }07 }08 }You need to expose the GetData method through a Web service. What should you do?
A. Insert the following line of code between lines 02 and 03.[System.Web.Services.WebService()]
B. Replace line 03 with the following line of code.public class Util : System.Web.Services.WebService
C. Insert the following line of code between lines 03 and 04.[System.Web.Services.WebMethod()]
D. Replace line 01 with the following line of code.<%@ WebService Language="C#" class="System.Web.Services.WebService" %>
Answer: C

2. You are writing a .NET Framework remoting client application that must call two remoting servers. The first server hosts an assembly that contains the following delegate and class definition.public delegate bool IsValidDelegate(string number, Int16 code);public class CreditCardValidator : MarshalByRefObject { public bool IsValid (string number, Int16 code) { //some data access calls that are slow under heavy load ... }}The second server hosts an assembly that contains the following delegate and class definition.public delegate float GetCustomerDiscountDelegate( int customerId);public class PreferredCustomer { public float GetCustomerDiscount(int customerId) { //some data access calls that are slow under heavy load ... }}You configure the remoting client application to call both server classes remotely. The amount of time it takes to return these calls varies, and long response times occur during heavy load times. The processing requires the result from both calls to be returned. You need to ensure that calls to both remoting servers can run at the same time. What should you do?
A. Write the following code segment in the client application.PreferredCustomer pc = new PreferredCustomer();CreditCardValidator val = new CreditCardValidator();double discount = pc.GetCustomerDiscount(1001);bool isValid = val.IsValid("4111-2222-3333-4444", 123);
B. Write the following code segment in the client application.PreferredCustomer pc = new PreferredCustomer();GetCustomerDiscountDelegate del1 = new GetCustomerDiscountDelegate(pc.GetCustomerDiscount);CreditCardValidator val = new CreditCardValidator();IsValidDelegate del2 = new IsValidDelegate(val.IsValid);double discount = del1.Invoke(1001);bool isValid = del2.Invoke("4111-2222-3333-4444", 123);
C. Write the following code segment in the client application.PreferredCustomer pc = new PreferredCustomer();GetCustomerDiscountDelegate del1 = new GetCustomerDiscountDelegate(pc.GetCustomerDiscount);IAsyncResult res1 = del1.BeginInvoke(1001, null, null);CreditCardValidator val = new CreditCardValidator();IsValidDelegate del2 = new IsValidDelegate( val.IsValid);IAsyncResult res2 = del2.BeginInvoke("4111-2222-3333-4444" , 123, null, null);WaitHandle[] waitHandles = new WaitHandle[] {res1.AsyncWaitHandle, res2.AsyncWaitHandle};ManualResetEvent.WaitAll(waitHandles);double discount = del1.EndInvoke(res1);bool isValid = del2.EndInvoke(res2);
D. Write the following code segment in the client application.PreferredCustomer pc = new PreferredCustomer();GetCustomerDiscountDelegate del1 = new GetCustomerDiscountDelegate(pc.GetCustomerDiscount);IAsyncResult res1 = del1.BeginInvoke(1001, null, null);double discount = del1.EndInvoke(res1);CreditCardValidator val = new CreditCardValidator();IsValidDelegate del2 = new IsValidDelegate( val.IsValid);IAsyncResult res2 = del2.BeginInvoke("4111-2222-3333-4444", 123, null, null);bool isValid = del2.EndInvoke(res1);
Answer: C

3. You are writing an application that handles the batch processing of user accounts. The application assigns network identities for users by calling the following Web service method.[WebMethod]public string GetNetworkID(string name){ ...}The application calls the Web service using the following code. (Line numbers are included for reference only.)01 void ProcessPeople(List<Person> people) {02 PersonService serviceProxy = new PersonService();03 serviceProxy.GetNetworkIDCompleted += new 04 GetNetworkIDCompletedEventHandler(GetNetworkIDCompleted);05 for (int i = 0; i < people.Count; i++) {06 ...07 }08 }0910 void GetNetworkIDCompleted(object sender, 11 GetNetworkIDCompletedEventArgs e){12 Person p = null;13 ...14 p.NetworkID = e.Result;15 ProcessPerson(p);16 }You need to ensure that the application can use the data supplied by the Web service to update each Person instance. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Replace line 06 with the following code segment.serviceProxy.GetNetworkIDAsync(people[i].FirstName,people[i]);
B. Replace line 06 with the following code segment.serviceProxy.GetNetworkIDAsync(people[i].FirstName,null);
C. Replace line 13 with the following code segment.p = e.UserState as Person;
D. Replace line 13 with the following code segment.p = sender as Person;
Answer: AC

4. A Web service exposes a method named GetChart that returns an image. The data used to generate the image changes in one-minute intervals. You need to minimize the average time per request for CPU processing. What should you do?
A. Set the BufferResponse property on the WebMethod attribute of the GetChart method to True.
B. Set the BufferResponse property on the WebMethod attribute of the GetChart method to False.
C. Set the CacheDuration property on the WebMethod attribute of the GetChart method to 60.
D. Set the CacheDuration property on the WebMethod attribute of the GetChart method to 1.
Answer: C

5. You create a Web service that exposes a Web method named CalculateStatistics. The response returned by the CalculateStatistics method for each set of input parameters changes every 60 seconds. You need to ensure that all requests to the CalculateStatistics method that have the same set of input parameters, and that occur within a 60-second time period, calculate the statistics only once. Which code segment should you use?
A. [WebMethod()]public string CalculateStatistics (int[] values) { HttpContext.Current.Response.Cache.SetCacheability( HttpCacheability.Public, "max-age=60"); ...}
B. [WebMethod(CacheDuration=60)]public string CalculateStatistics(int[] values) { ... }
C. [WebMethod()]public string CalculateStatistics (int[] values) { HttpContext.Current.Response.Cache.SetExpires( DateTime.Now.AddSeconds(60)); ...}
D. [WebMethod(BufferResponse=60)]public string CalculateStatistics(int[] values) { ... }
Answer: B

6. A class library named MathLib contains the following code.public class MathClass : MarshalByRefObject { public decimal DoHugeCalculation(int iterations) { decimal result; //Some very lengthy calculations ... return result; }}The MathLib class is hosted in a .NET Framework remoting server application. A Windows application project running on a client computer contains the following class.public class MathClient { public void ProcessHugeCalculation(int iterations) { MathClass cm = new MathClass(); decimal decRes = cm.DoHugeCalculation(iterations); //process the result ... }}The MathClient class must call the MathClass class asynchronously by using remoting. A callback must be implemented to meet this requirement. You need to complete the implementation of the MathClient class. What should you do?
A. Modify the MathClient class as follows:public class MathClient {public delegate void DoHugeCalculationDelegate(decimal result);public event DoHugeCalculationDelegate DoHugeCalculationResult;public void DoHugeCalculationHandler(decimal result) {DoHugeCalculationResult(result);} public void ProcessHugeCalculation(int iterations) { //Hook up event handler here... ... }}
B. Apply the Serializable attribute to the MathClient class.
C. Modify the MathClient class as follows:public class MathClient { private delegate decimal DoHugeCalculationDelegate(int iterations); private void DoHugeCalculationCallBack(IAsyncResult res) { AsyncResult aRes = (AsyncResult)res; decimal decRes = ((DoHugeCalculationDelegate)aRes. AsyncDelegate).EndInvoke(res); //process the result ... } public void ProcessHugeCalculation(int iterations) { MathClass cm = new MathClass(); DoHugeCalculationDelegate del = new DoHugeCalculationDelegate( cm.DoHugeCalculation); del.BeginInvoke(iterations, new AsyncCallback( DoHugeCalculationCallBack), null); }}
D. Apply the OneWay attribute to all methods in the MathClass class.
Answer: C

7. An administrator reports that when a client application runs, the application throws a RemotingException exception with the message: "Object '/40b4b673_e739_43df_abe4_ee269ff67173/0t_g9ytvvi_lgue2i9q5qrni_1.rem' has been disconnected or does not exist at the server". You discover the following information: The object causing the exception is configured as a Client Activated Object (CAO).The exception is thrown only if the client application is idle for more than five minutes.If the client application is idle for nine minutes, the client application shuts down and the user is logged out. You need to ensure that the CAO is available to the client application. What should you do?
A. Add the following XML to the App.config file for the client application.<configuration> <system.runtime.remoting> <application> <lifetime leaseTime="999999999999" /> </application> </system.runtime.remoting></configuration>
B. Add the following code to the CAO class.public override object InitializeLifetimeService() { ILease lease = (ILease)base.InitializeLifetimeService(); if (LeaseState.Initial == lease.CurrentState) { lease.RenewOnCallTime = TimeSpan.FromMinutes(10); } return lease;}
C. Add the following code to the CAO class.public override object InitializeLifetimeService() { ILease lease = (ILease)base.InitializeLifetimeService(); if (LeaseState.Initial == lease.CurrentState) { lease.SponsorshipTimeout = TimeSpan.FromMinutes(10); } return lease;}
D. Add the following XML to the App.config file for the client application.<system.runtime.remoting> <application> <lifetime leaseManagerPollTime="10m" /> </application></system.runtime.remoting>
Answer: B

8. You create a Web service that will be deployed to a production Web server. You need to ensure that the first Web service request returns a response in the shortest amount of time possible. What should you do?
A. Run the ASP.NET Compilation tool (Aspnet_compiler.exe) on the Web service project. Copy the generated files to the Web server.
B. In the Web.config file, set the batch attribute in the compilation element to True. Deploy the .asmx files and the source code files to the Web server.
C. Set the CodeBehind attribute on the @WebService directive. Deploy the .asmx files and the source code files to the Web server.
D. Build the Web service project on the development platform. Deploy the .asmx files and the contents of all subdirectories to the Web server.
Answer: A

9. You create a Web service. The Web service must be deployed on a remote Web server. You need to ensure that the deployment does not place the source code for the Web service on the Web server. What should you do?
A. Move the contents of the development Web site to the Web server.
B. Use the ASP.NET Compilation tool (Aspnet_compiler.exe) to compile the Web service locally. Move the resulting files to the Web server.
C. Add a Class attribute to the @WebService directive. Rebuild the Web service project and deploy it by using the Copy Web Site Wizard.
D. Add a CodeBehind attribute to the @WebService directive. Rebuild the Web service project and deploy it by using the Copy Web Site Wizard.
Answer: B

10. You create a Web service. The method in the Web service maintains session information between calls. When a client invokes the method, the following exception is thrown.System.Web.Services.Protocols.SoapException: Server was unable toprocess request. ---> System.NullReferenceException: Object reference not set to an instance of an object. You need to ensure that the Web service method can be called without generating an exception. What should you do?
A. Use the WebService.Session object instead of the HttpContext.Session object to access the session variables.
B. Set the EnableSession property of the WebMethod attribute to True.
C. Set the ConformsTo property in the WebServiceBindingAttribute attribute to WsiProvfiles.BasicProfile1_1.
D. Set the AllowAutoRedirect property on the proxy class on the Web service client to True.
Answer: B

11. An application fails when executing a specific operation. You discover that the failure occurs when an exception is raised by a Web service. The application uses the following code to call the Web service.void Process() { ProcessService serviceProxy = new ProcessService(); serviceProxy.ProcessDataCompleted += new ProcessDataCompletedEventHandler(ServiceCompleted); serviceProxy.ProcessDataAsync(data);}You need to ensure that the application does not fail when the Web service raises the exception. Your solution must maximize the performance of your code. What should you do?
A. Register the following method with the proxy object to receive the notification of completion.void ServiceCompleted(object sender, ProcessDataCompletedEventArgs e){ if (sender is SoapException) LogMessage(e.Error.Message); else ProcessResult(e.Result);}
B. Register the following method with the proxy object to receive the notification of completion.void ServiceCompleted(object sender, ProcessDataCompletedEventArgs e){ if (e.Error is SoapException) LogMessage(e.Error.Message); else ProcessResult(e.Result);}
C. Register the following method with the proxy object to receive the notification of completion.void ServiceCompleted(object sender, ProcessDataCompletedEventArgs e){ try { ProcessResult(e.Result); } catch (Exception ex){ Console.WriteLine(ex.Message); }}
D. Register the following method with the proxy object to receive the notification of completion.void ServiceCompleted(object sender, ProcessDataCompletedEventArgs e) { if (e.Error != null) LogMessage(e.Error.Message); else ProcessResult(e.Result);}
Answer: D

12. You use Microsoft Visual Studio 2005 to create a custom Web service discovery system that contains Disco files for your Web services. You need to have the Disco file for each of your Web services for auditing purposes. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. Append the Disco parameter to the Web service's .asmx URL's querystring and save the returned data.
B. Open the Web service's Web services description language (WSDL) file and copy the method information into the Disco file for that Web service.
C. Add a reference to the Web service in Visual Studio 2005 and use the generated Disco file.
D. Append the Web services description language (WSDL) parameter to the Web service's .asmx URL's querystring and save the returned data.
Answer: AC

13. You are converting an application to use .NET Framework remoting. The server portion of the application monitors stock prices and contains a class named StockPriceServer, which is a Server Activated Object (SAO). The client computer interacts with the server using a common assembly. When the server attempts to raise an event on the client computer, the server throws the following exception.System.IO.FileNotFoundException.You discover that the event delegate is not being called on the client computer. You need to ensure that the server application can raise the event on the client computer. What should you do?
A. Add the Serializable attribute to the StockPriceServer class and change the event to use one of the standard common language runtime (CLR) delegates.
B. In the common assembly, add an interface that contains the event and a method to raise the event. Implement that interface in the StockPriceServer class and use the interface's event to register the delegate message on the client computer.
C. Add the event delegate to the common assembly. Implement the Add delegate and the Remove delegate methods of the event in the StockPriceServer class to reference the delegate method in the client application.
D. Raise the event using the BeginInvoke method and pass a reference to the client computer.
Answer: B

14. You create a .NET Framework remoting application that provides stock information to customers. The server component raises an event on the client computer when certain conditions are met. You need to ensure the server raises exactly one event for each client application that is registered for the event. What should you do?
A. Configure the server class as a Singleton Server Activated Object (SAO) and check for duplicate client delegate methods before raising the event.
B. Configure the server class as a Client Activated Object (CAO) and override the CreateObjRef method to check for duplicate client delegate methods before raising the event.
C. Configure the server class as a SingleCall Server Activated Object (SAO) and check for duplicate client delegate methods before raising the event.
D. Configure the server class as a Client Activated Object (CAO) and check for duplicate client delegate methods before raising the event.
Answer: A

联系我们
联系手机:13861768475
MSN:saleintest@hotmail.com
QQ留言 QQ留言

首页 |代考流程 | 常见问题 | 证书查询 | 认证资讯 | 联系我们 | 站点导航 1 2 3 4 | 站点地图

Any charges made through this site will appear as CertBible Tech LTD. All trademarks are the property of their respective owners.

Copyright©2006-2011 mcsepass Limited. All Rights Reserved