PrepAway - Latest Free Exam Questions & Answers

You are developing an ASP.NET MVC application.

You are developing an ASP.NET MVC application.

You need to authenticate clients by using NT LAN Manager (NTLM).

Which authentication method should you implement?

A. Basic

B.

Windows

C. Forms

D. Kerberos

References: http://msdn.microsoft.com/en-us/library/aa292114(v=vs.71).aspx


Leave a Reply

PrepAway - Latest Free Exam Questions & Answers

You are developing an ASP.NET MVC application.

You are developing an ASP.NET MVC application.

The application must allow users to enter JavaScript in a feedback text box only.

You need to

disable request validation.

What should you do?

A. Apply and set the CausesClientSideValidation attribute on the text box to FALSE.

B. Apply and set the ValidateInput attribute on the text box to FALSE.

C. Use the HttpRequest.Unvalidated property to read

the unvalidated form value.

D. Use the HttpRequest.Form property to read the unvalidated form value.

Explanation:

The HttpRequest.Unvalidated property gets the HTTP request values without triggering request validation.

Request validation check

s for HTML markup and script that might indicate a potential cross-site scripting attack. By default, all values are checked using request validation and if any values contain markup or script, ASP.NET throws an HttpRequestValidationException exception. Us

e this method if you anticipate that the request will contain markup (for example, you are allowing users to post content that contains markup) and you want to get the raw value of a request.

References: https://msdn.microsoft.com/en-us/library/system.web

.httprequest.unvalidated.aspx


Leave a Reply

PrepAway - Latest Free Exam Questions & Answers

You are developing an ASP.NET MVC application.

You are developing an ASP.NET MVC application.

The application has a contact view includes a form for editing the displayed contact.

You need to save the Contact object model whe

n the form is posted back to the EditContact method using a POST method request.

Which code segment should you use? Each correct answer presents a complete solution. Choose all that apply.

A. public ActionResult EditContact(){var c = newContact(){FirstNa

me = Request.QueryString[-FirstName-],LastName = Request.QueryString[-LastName-]},SaveContact(c);return View(c);}

B. public ActionResult EditContact(Contact c){SaveContact(c);return View(c);}

C. public ActionResult EditContact(FormCollection values){var

c = newContact(){FirstName = values[-FirstName-],LastName = values[-LastName-]},SaveContact(c);return View(c);}

D. public ActionResult EditContact(QueryStringProvider values){var c = newContact(){FirstName = values.GetValue[-FirstName-],LastName = valu

es.GetValue [-LastName-]},SaveContact(c);return View(c);}


Leave a Reply

PrepAway - Latest Free Exam Questions & Answers

You are developing an ASP.NET MVC application. D…

You are developing an ASP.NET MVC application. D

evices that use many different browsers will use the application.

You have the following requirements:

Content must display correctly when a device is in landscape or portrait orientation.

Content must not scale when the device orientation changes.

Content must be displayed by using the maximum available screen space.

The application must render properly in Internet Explorer 8 or later versions.

You need to configure the application.

Which two actions should you perform? Each correct answer present

s part of the solution.

A. Use JavaScript to evaluate the window.innerWidth and window.innerHeight properties.

B. Set the value of the width property for the viewport meta tag to device-width.

C. Use CSS to target the HTML element on each page. Set the va

lues of the width and height properties to 100%.

D. Use CSS media queries to target screen size, device orientation, and other browser capabilities.

Explanation:

B: If you want the viewport width to match the device-s physical pixels, you can

specify the following:

For this to work correctly, you must not explicitly force elements to exceed that width (e.g., using a width attribute or CSS property), otherwise the browser will be forced to

use a larger viewport regardless.

D: Media queries in CSS3 extend the CSS2 media types idea: Instead of looking for a type of device, they look at the capability of the device.

Media queries can be used to check many things, such as:

width and height of t

he viewport

width and height of the device

orientation (is the tablet/phone in landscape or portrait mode?)

resolution

Using media queries are a popular technique for delivering a tailored style sheet to tablets, iPhone, and Androids.

References:

https://www.asp.net/whitepapers/add-mobile-pages-to-your-aspnet-web-forms-mvc-application

http://www.w3schools.com/css/css3_mediaqueries.asp


Leave a Reply

PrepAway - Latest Free Exam Questions & Answers

You are developing an ASP.NET MVC application.

You are developing an ASP.NET MVC application.

You need to authenticate clients by using an ASP.NET membership database.

Which authentication method should you implement?

A. Kerberos

B. Windows

C. Forms

D.

Basic

To use authentication through a membership database, you must first configure it for your site. The following are the basic steps you follow in

order to configure membership:

Specify membership options as part of your Web site configuratio

n.

Configure your application to use forms authentication

Define user accounts for membership.

References: https://msdn.microsoft.com/en-us/library/yh26yfzy.aspx


Leave a Reply