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

Question: You work as an application developer at Company.com. The previous developer created a Microsoft ASP.NET application that uses Microsoft .NET Framework 3.5. You need to capture the timing and performance information of the application. Management wants you to make sure that data is only accessible when a client is logged onto the Web server not the individual Web pages. What should you do?

  1. You should consider adding <compilation debug=”true” /> to the Web.config fil
  2. You should consider adding <compilation debug=”false” urlLinePragmas=”true” /> to the Web.config fil
  3. You should consider adding <trace enabled=”true” writeToDiagnosticsTrace=”true” pageOutput=”true” localOnly=”true” /> to the Web.config fil
  4. You should consider adding <trace enabled=”true” pageOutput=”false” localOnly=”true” /> to the Web.config fil

Correct Answer: 4


Question: You work as a Web Developer at Company.com. You make use of Microsoft ASP.NET 3.5 in order to create a Web Sit

  • In a separate code file you create the following class:
    public static class _Colors
    {
    public static Color NormalActivityColor = Color.Green;
    public static Color WarningActivityColor = Color.Yellow;
    public static Color ErrorActivityColor = Color.Red;
    public static Color GetRandomColor()
    {
    Random random = new Random((int)DateTime.Now.Ticks);
    int randomArgbValue = random.Next();
    Color color = Color.FromArgb(255, Color.FromArgb(randomArgbValue));
    return color;
    }
    } 

    You need to ensure that the class is consumed by the Web Sit

  • You have to configure the Web Site project. What should you do?
    1. You should add the file to the App_Code folder of the project.
    2. You should add a Register directive that will reference the file to every page that makes use of the class.
    3. This can be accomplished by referencing the file in the assemblies segment of the Web.config fil
    4. This can be accomplished by referencing the file in the httpHandlers segment of the Web.config fil

    Correct Answer: 1


    Question: You work as a Web Developer at Company.com. Company.com makes use of Microsoft ASP.NET 3.5. You make use of this application to create a Web sit

  • Another developer defined a custom configuration section in the Web.config fil
  • You obtain the source file that contains the implementation of the configuration section. You want to configure the application in order for the configuration section to be processed by ASP.NET. What should you do?
    1. You should add a Reference directive to the Global.asax fil
    2. Then the VirtualPath attribute should be set to the location of the source fil
    3. You should add the source file to the App_Code folder.
    4. You should add a Register directive to the Global.asax fil
    5. Then the Src attribute should be set to the location of the source fil
    6. You should add the source file to the project as an embedded resourc

    Correct Answer: 2


    Question: You work as an application developer at Company.com. You are currently using Microsoft .NET Framework 3.5 to create an ASP.NET application. Your application is hosted on a IIS 6.0 Web server named Company-SR07. Your application contains a class named TestMedi

    1. This class will be used to implements the IHttpHandler interfac
    2. Namespace Company.Web.UI
      Public Class TestMedia
      Implements IHttpHandler
      ...
      End Class
      End Namespace 

      You receive an instruction from management to configure the TestMedia class to processes files that have the .ckm file extension and return the content of the files from Company-SR07. You map the .ckm file extension to the aspnet_isapi.dll file on Company-SR07. What should you do next?

      1. You should consider using the code segment below:
        <httpHandlers>
        <add verb=”*” path=”*.ckm” validate=”false” type=”Company.Web.UI.TestMedia” />
        </httpHandlers>
      2. You should consider using the code segment below:
        <httpHandlers>
        <add verb=”GET,POST” path=”*” validate=”true” type=”Company.Web.UI.TestMedia” />
        </httpHandlers>
      3. You should consider using the code segment below:
        <httpHandlers>
        <add verb=”*.ckm” path=”*” validate=”false” type=”Company.Web.UI.TestMedia” />
        </httpHandlers>
      4. You should consider using the code segment below:
        <httpHandlers>
        <add verb=”HEAD” path=”*.ckm” validate=”true” type=”Company.Web.UI.TestMedia” />
        </httpHandlers>

      Correct Answer: 1


      Question: You work as an application developer at Company.com. You are in the process of creating a Microsoft ASP.NET application that uses Microsoft .NET Framework 3.5. In order to implement the IHttpHandler interface you decide to create a class named TestHandler. You want to add code to the TestHandler class to implement the ShowContent method that displays a bg.jpg file when the IHttpHandler is requeste

    3. What should you do?
      1. You should consider adding:
        public void ShowContent(HttpContext ckc) {
        streamReader readr = new StreamReader(File.OpenRead(ckc.Server.MapPath(“bg.jpg”)));
        ckc.Response.Pics(readr.ReadToEnd());
        readr.Close();
        }
      2. You should consider adding:
        public void ShowContent(HttpContext ckc) {
        ckc.Response.ContentType = “image/jpg”;
        FileStream filestr = File.OpenRead(ckc.Server.MapPath(“bg.jpg”));
        int x;
        while ((x = filestr.ReadByte()) != -1) {
        ckc.Response.OutputStream.WriteByte((byte)x);
        }
        filestr.Close();
        }
      3. You should consider adding:
        public void ShowContent(HttpContext ckc) {
        StreamReader readr = new StreamReader(File.OpenRead(ckc.Server.MapPath(“bg.jpg”)));
        ckc.Response.Pics(“image/jpg”);
        ckc.Response.TransmitFile(readr.ReadToEnd());
        readr.Close();
        }
      4. You should consider adding:
        public void ShowContent(HttpContext ckc) {
        ckc.Response.TransmitFile(“image/jpg”);
        FileStream filestr = File.OpenRead(ckc.Server.MapPath(“bg.jpg”));
        int x;
        while ((x = filestr.ReadByte()) != -1) {
        ckc.Response.OutputStream.WriteByte((byte)x);
        }
        filestr.Close();
        }

      Correct Answer: 2

  • Tagged . Bookmark the permalink.

    Leave a Reply