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

Question: You work as an application developer at Company.com. You create an ASP.NET application. You make use of .NET Framework 3.5 to create the application. The service contract below is exposed by the Microsoft Windows Communication Foundation (WCF) service that you created. (The line numbers is included for reference purposes)
1 <Contract()> Public Interface IBlogService
2 <OpContract()>
3 <WebGet(ResponseFormat := WebMessageFormat.Xml)>
4 Function GetPost() As Rss20FeedFormatter
5 End Interface
The Microsoft Windows Communication Foundation service is configured to use the use the WebHttpBinding class. The service will be exposed at http://www.Company.com/BlogService. You have been informed by management that the GetPost operation results needs to be stored in an XmlDocument variable in the Web Form. You name this variable Testsxml. What should you do?

  1. This can be accomplished using the subsequent code segment:
    Dim _url As String = “http://www.Company.com/BlogService”
    Dim _reader As XmlReader = XmlReader.Create(_url)
    Testxml.Load(_reader)
  2. This can be accomplished using the subsequent code segment:
    Dim _bnd As New BasicHttpBinding()
    Dim _uri As New EndpointAddress(“http://www.Company.com/BlogService”)
    Dim _fact As New ChannelFactory(Of IBlogService)(_bnd, _uri)
    Dim _srv As IBlogService = _fact.CreateChannel()
    Dim _feed As Rss20FeedFormatter = _srv.GetPost()
    Testxml.LoadXml(_feed.ToString())
  3. This can be accomplished using the subsequent code segment:
    Dim _url As String = “http://www.Company.com/BlogService/GetPost”
    Dim _reader As XmlReader = XmlReader.Create(_url)
    Testxml.Load(_reader)
  4. This can be accomplished using the subsequent code segment:
    Dim _bnd As New BasicHttpBinding()
    Dim _uri As New EndpointAddress(“http://www.Company.com/BlogService/GetPost”)
    Dim _fact As New ChannelFactory(Of IBlogService)(_bnd, _uri)
    Dim _srv As IBlogService = _fact.CreateChannel()
    Dim _feed As Rss20FeedFormatter = _srv.GetPost()
    Testxml.LoadXml(_feed.Feed.ToString())

Correct Answer: 3


Question: You work as an ASP.NET 3.5 Developer at Company.com. You are in the process of creating a Web application that is accessed at http://www.Company.com/app. The application needs to display an automatically produced page that contains the stack trace when an unhandled exception occurs if the client accesses the application at http://127.0.0.1/app, the application must display an automatically generated page containing the stack trace when an unhandled exception occurs. You need to configure the Web.config file accordingly. Identify the configuration that will accomplish this?

  1. <customErrors mode=”Off”>
    <error statusCode=”500″ redirect=”Trace.aspx”>
    </customErrors>
  2. <customErrors mode=”RemoteOnly” defaultRedirect=”Trace.aspx”>
    </customErrors>
  3. <customErrors mode=”On”>
    <error statusCode=”500″ redirect=”Trace.aspx”>
    </customErrors>
  4. <customErrors mode=”Off” defaultRedirect=”Trace.aspx”>
    </customErrors>

Correct Answer: 2


Question: You work as Web Developer at Company.com. You make use of Microsoft ASP.NET 3.5 to create a Web application. You want to configure the Web.config file to enable debugging for all pages in the application. What should you do?

  1. You should use the configuration:
    <compilation debug=”true”/>
  2. You should use the configuration:
    <pages configSource=”debug”/>
  3. You should use the configuration:
    <appSettings>
    <add key=”compilation” value=”debug”/>
    </appSettings>
  4. You should use the configuration:
    <system.diagnostics>
    <switches>
    <add name=”debug” value=”true”/>
    </switches>
    </system.diagnostics>

Correct Answer: 1


Question: You work as the application developer at Company.com. You use Microsoft .NET Framework 3.5 to create a Microsoft ASP.NET application that has two HTML pages Error.htm and NotFound.htm. Management wants you to make sure that the NotFound.htm page only to be displayed when the user request a page that does not exist on the server and the Error.htm page to be displayed when any other error occur. What should you do?

  1. Your best option would be to add the subsequent section to the Web.config file:
    <customErrors mode=”Off” defaultRedirect=”Error.htm”>
    <error statusCode=”404″ redirect=”NotFound.htm”/>
    </customErrors>
  2. Your best option would be to add the subsequent section to the Web.config file:
    <customErrors mode=”Off”>
    <error statusCode=”400″ redirect=”Error.htm”/>
    <error statusCode=”404″ redirect=”NotFound.htm”/>
    </customErrors>
  3. Your best option would be to add the subsequent section to the Web.config file:
    <customErrors mode=”On”>
    <error statusCode=”400″ redirect=”Error.htm”/>
    <error statusCode=”404″ redirect=”NotFound.htm”/>
    </customErrors>
  4. Your best option would be to add the subsequent section to the Web.config file:
    <customErrors mode=”On” defaultRedirect=”Error.htm”>
    <error statusCode=”404″ redirect=”NotFound.htm”/>
    </customErrors>

Correct Answer: 4


Question: You work as a junior Web Developer at Company.com. You use Microsoft ASP.NET 3.5 to create a Web application. The Company.com network contains a test server named Company-SR01. You deploy the application to Company-SR01 and enable debugging. The application is hosted in Microsoft Internet Information Services (IIS) 6.0. You enable debugging and Integrated Windows authentication, and disable anonymous access. You have no administrative rights on the test server. The following configuration exists in the Web.config file:

<authentication mode="Windows"/>
<identity impersonate="false"/>
<customErrors mode="On" defaultRedirect="GenericError.aspx"/>
<authorization>
<deny users="?"/>
</authorization>

You need to configure the Web.config file in order for you to debug the application from your development computer. What should you do?

  1. You should consider using:
    <authentication mode=”Forms”/>
  2. You should consider using:
    <identity impersonate=”true”/>
  3. You should consider using:
    <authorization>
    <allow users=”?”/>
    </authorization>
  4. You should consider using:
    <authorization>
    <allow users=”*”/>
    </authorization>

Correct Answer: 2

Tagged . Bookmark the permalink.

Leave a Reply