Web Developer Framework 4.0 Sample Questions – 18

Question: You are debugging an ASP.NET Web page. The page includes the following method.
[WebMethod]
public string GetServerString() {& }

The page also includes the following markup.
<asp:ScriptManager ID="sm1" runat="server" />
The following JavaScript code is used to call the GetServerString method.
function GetString() {
PageMethods.GetServerString(callbackMethod); }
function callbackMethod(str) {& }

The AJAX calls to the GetServerString method are failing. You need to ensure that the AJAX call to the GetServerString method succeeds. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

  1. Set the EnablePageMethods property of the ScriptManager control to true.
  2. Set the EnablePartialRendering property of the ScriptManager control to true.
  3. Change the WebMethod attribute of the GetServerString method to WebMethod(EnableSession=true).
  4. Declare the GetServerString method as static.

Correct Answer: 1 & 4


Question: You are adding new capabilities to an ASP.NET Web site. The site currently connects to a Microsoft SQL Server database by using the credentials of the CONTOSOAppIdentity account, which has been granted access to only objects within the database. The application requires the following implementation. Database objects that support ASP.NET roles must be added to the existing database. The CONTOSOAppIdentity user must be granted only the minimum privileges that are required to support all features of ASP.NET roles. You need to add the ASP.NET roles support. Which two actions should you perform? (Each correct answer presents part of the complete solution. Choose two.)

  1. Use the aspnet_regsql tool.
  2. Use the aspnet_regiis tool.
  3. Add the CONTOSOAppIdentity user to the aspnet_Roles_FullAccess database role.
  4. Add the CONTOSOAppIdentity user to the db_accessadmin database role.

Correct Answer: 1 & 3


Question: You are developing an ASP.NET Web application that you will deploy to an Internet Information Services (IIS) 7.0 server. The application will run in Integrated pipeline mode. The application contains a photo gallery of images that are stored in a Microsoft SQL Server database. You need to ensure that the application can retrieve images from the database without blocking IIS worker process threads. What should you do?

  1. Create a synchronous HttpHandler that is registered in the <httpHandlers> section in the web.config file.
  2. Create an asynchronous HttpHandler that is registered in the <handlers> section under system.webServer in the web.config file.
  3. Create a custom HttpModule that is registered in the <httpModules> section in the web.config file.
  4. Create an asynchronous HttpHandler that is registered in the <httpHandlers> section in the web.config file.

Correct Answer: 2


Question: You are creating an ASP.NET Web application. The application must call a WCF service by using a WCF routing service. You need to ensure that the application can invoke the target service by using the router endpoint. What should you do?

  1. Add a service reference to the router service. In the client binding configuration, specify the address of the router service.
  2. Add a service reference to the target service. In the client binding configuration, specify the address of the target service.
  3. Add a service reference to the router service. In the client binding configuration, specify the address of the target service.
  4. Add a service reference to the target service. In the client binding configuration, specify the address of the router service.

Correct Answer: 4


Question: You are developing an ASP.NET Web page. The page includes a List instance. You add a FormView control to display a single Product from this list. You need to bind the list to the FormView control. Which FormView property should you set in the code-behind file?

  1. DataSource
  2. DataSourceID
  3. DataKeyNames
  4. DataMember

Correct Answer: 1

Tagged . Bookmark the permalink.

One Response to Web Developer Framework 4.0 Sample Questions – 18

  1. Raju Patel says:

    I’m still learning from you, while I’m making my way to the top as well. I definitely liked reading all that is written on your website. Keep the tips coming. I loved it!

Leave a Reply