Exam 70-562 : Microsoft .NET Framework 3.5, ASP.NET Application Development – 22

Question: You work as an application developer at Company.com. You are in the process of creating an ASP.NET AJAX enabled application using .NET Framework 3.5. You are experiencing problems with the JavaScript code in the application. You want to debug the JavaScript. You then attach Microsoft Visual Studio 2008 debugger to the Microsoft Internet Explorer instance. You want the details of the client side object on the debugger console is displayed on the application. What should you do?

  1. This can be achieved using the Sys.Debug.fail method.
  2. This can be achieved using the Sys.Debug.traceDump method.
  3. This can be achieved using the Sys.Debug.trace method.
  4. This can be achieved using the Sys.Debug.assert method.

Correct Answer: 2


Question: You work as a Web Developer at Company.com. You make use of Microsoft ASP.NET 3.5 to create a Web application. A page in the application holds the code that calls the Write and Warn methods of the TraceContext class. The code also adds an instance of EventLogTraceListener to the System.Diagnostics.Trace.Listeners collection. You need to ensure that the Write and Warn methods of the TraceContext class will write ASP.NET trace messages to the event log automatically. You have to configure the Web application to accomplish this. What should you do?

  1. In the the Web.config file, you should add the configuration:
    <trace enabled=”true” pageOutput=”true” localOnly=”true” writeToDiagnosticsTrace=”true”/>
  2. On the page, you should add the next Page directive:
    <%@ Page Trace=”true” Debug=”false” %>
  3. In the the Web.config file, you should add the configuration:
    <trace enabled=”true” pageOutput=”false” localOnly=”true” writeToDiagnosticsTrace=”true”/>
  4. On the page, you should add the next Page directive:
    <%@ Page Trace=”true” Debug=”true” %>

Correct Answer: 3


Question: You work as a Web Developer at Company.com. You are in the process of creating a Web application that uses Microsoft ASP.NET 3.5. The code below is present in the application:

public class Account
{
public double Balance { get; set; }
public void Deposit(double amount)
{
Balance += amount;
}
public void Withdraw(double amount)
{
System.Diagnostics.Trace.WriteLineIf(amount > Balance, "Potential Overdraft.");
if (amount <= Balance)
{
Balance -= amount;
}
}
} 

The above code will write a trace message when there is a potential for an overdraft. You need to configure the Web.config file in order to write the trace message to the trace viewer tool (Trace.axd). Identify the configurations that should be used? (Choose all that apply)

  1. You should use the following:
    <trace enabled=”true”/>
  2. You should use the following:
    <system.diagnostics>
    <trace>
    <listeners>
    <add name=”WebPageTraceListener” type=”System.Web.WebPageTraceListener, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”/>
    </listeners>
    </trace>
    </system.diagnostics>
  3. You should use the following:
    <trace enabled=”false” writeToDiagnosticsTrace=”true”/>
  4. You should use the following:
    <trace enabled=”false” writeToDiagnosticsTrace=”true” pageOutput=”false”/>
  5. You should use the following:
    <system.diagnostics>
    <switches>
    <add name=”PageOutput” value=”Trace.axd”/>
    </switches>
    </system.diagnostics>

Correct Answer: 1,2


Question: You work as a Web Developer at Company.com. You create a Web application that uses Microsoft ASP.NET 3.5. Company.com hosts the application that uses Microsoft Internet Information Services 7.0. You attempt to browse the application and receive the following error message: Service Unavailable HTTP Error 503. The service is unavailable. You check and discover that you are able to browse successfully to other application that forms part of the same IIS Web site. The hosted applications on the network make use of ASP.NET 3.5. There are not previous versions of ASP.NET is installed. You need to resolve this error as soon as possible. What should you do?

  1. You should run the ServiceModel Metadata Utility tool (Svcutil.exe).
  2. You should change the pipeline mode associated with the application pool that hosts the application.
  3. You should run the ASP.NET Registration Tool (Aspnet_regiis.exe).
  4. You should make sure that the application pool that hosts the application is initiated.

Correct Answer: 4


Question: You work as a Web Developer at Company.com. You are in the process of creating a Web application that uses Microsoft ASP.NET 3.5. You host the Web application that uses Microsoft Internet Information Services (IIS) 6.0. You browse the application and receive the following error message: Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the “Refresh” button in your web browser to retry your request. You view the Application event log and discover the following message: It is not possible to run two different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process. To ensure productivity you need to solve this problem as quick as possible. What should you do? (Choose all that apply)

  1. You should change the IIS isolation mode.
  2. You should assign the application to another application pool.
  3. You should configure all applications that are part of your application’s application pool in order to use the same version of ASP.NET.
  4. You should run the Aspnet_regiis.exe Tool.
  5. You should restart the application pool that hosts the application.

Correct Answer: 2,3

Tagged . Bookmark the permalink.

Leave a Reply