Thursday, April 22, 2010

MCPD .NET 4 Preparing for the Microsoft beta exam 70-519 - Code Crackin #19

Hey Now Everybody,

Preparing for the Microsoft MCPD .NET 4 beta exam 70-519. This is the next version of the 3.5 70-564 exam. The MCTS exams have the self paced training kit books which are stellar resources to study from, however the MCPD exams there isn’t as much exam prep materials. Outlined are the skills measured in this exam.

This is posted to help people & myself study for the exam & learn more about .NET 4. Below are some key points that I’ve summarized so we can just read basically one or two sentences which will cover one topic or concept. I’ve tried to present this content in a way to use our time most efficiently with not much repetition and content we we use.

70-564 / 70-519 / 71-519
Key Concepts:

331 AD Authentication mode & identity Impersonation such as <authentication mode="Windows" /><identity impersonate="true" />

332 Master pages & webconfig specifies master page for application

333. DataSources for example LinqDataSource, when data's being retrieved by a datacontext object

334. Prevent harmful scripts being stored in sql db we can ValidateRequest attribute of the @Page directive should be set to false & saving the text to the database, you should make use of the Server.HtmlEncode method

335. Verifying data inputted into db is valid by when the Page.IsValid property is True use the Click event handler of the
   Button control to submit the data

336  Store data for lifetime of app we can use In-memory of the Web server process should be used as the storage.

337. Web Apps -When pages are updated frequently & we want quick startup time we precompile the application along with the fixed assembly names by using the aspnet_compiler utility.

338. Ensure updating pages doesn't effect load time of other pages we use a Web site project copy the entire application to the deployment server and copy only the updated files to the server.

339. Multiple master pages with user controls to dynamically reference the control we:
    Code each master page class to implement a common interface exposing the ImageUrl property of the Image control
   create a strongly typed master page reference by using the @ MasterType directive on each content page

4110 Upgrading applications by upgrade the application to a Visual Studio 2010 Web application project

4111 AD auth - When an unauthenticated user hits a page we want to force them to enter uid & pw we use of Forms authentication.Use the ActiveDirectoryMembershipProvide class

4112 when a data bound control which we can page through records, create, update we can use a FormView

4113. When a page displays data from a db based on an id & not creating a new node in the sitemap for each page we can handle the SiteMap.SiteMapResolve event

4114. When we want to display data in a grid we retrieve data for the GridView control by using the SqlDataSource control

4115. When a control supports 2 languages such as all German-region views in German all others in english we can for each page without any culture specified & ge culture, create a resource file place the files in the App_LocalResources directory

4116. Consistent display properties of controls we define a skin for each type of ASP.NET server control that is used in the app

4117. A DAL supporting 3rd party vendors the data access object we use OleDbDataAdapter

4118. Deploying an app ensure assemblies comply w/ rules & naming conventions we create a Web app project, the output assembly name should be set to conform to the rules.

4119 Excel files in a folder that we don't want accessed from bots we have each the Excel files should be mapped to the ASP.NET ISAPI filter & a <deny> element should be added to the <authorization> element in the Web.config file

4120. When a firewall denies access on ports 80 & 443 we use the Secure Sockets Layer (SSL) on port 443 to expose the Web services.

8221. Databound server control that uses customized item templates & uses the DataPager we use a ListView.

8222. when subdirctories are permission based by roles & stored in a single web.config file we'd use the <location> node.

8223. Apply a theme to a page we'd use the handler for the Page.PreInit event

8224. When we store state of a shopping cart by UID the shopping cart should be stored in a user profile property.

8225. Display content in languages of users preference we use the value of the Page.UICulture property should be set to a value stored in a user profile property.

8226. Log all audit events for an app we configure the eventMappings node in the Machine.config file so that a single entry for auditing events is present for All Audits.

8227. Improve search relevancy of page URL by not having .aspx ext use an HttpModule object can be used to make sure of this.

8228 Use 3rd party db's & prevent update or delete the data tier object we choose to use OleDbDataReader

8229. Custom client side & AJAX behaviors to be added to server controls we can for each server control, a custom extender control has to be created. After add the extender controls along with the server controls in the Web forms.

8230. Validate against AD by client side script. code fragment should be added to the Web.config file of the application <authentication mode="Forms" />
configure the application, making it use the ActiveDirectoryMembershipProvider class.

8231. Implementing a master page we can:
  set the MasterPageFile property on each page to the virtual path of the master page file
& configure a virtual directory within each app, and point the virtual directory to the folder containing the master page
& copy the master page into a single folder on the server

8232 Modify & update data that is retrieved from a data set. using SQLCommandBuilder the update command for related SQLDataAdapter class we'd after the UpdateCommand property of the SqlDataAdapter class is set to a SqlCommand object, we use a custom UPDATE statement and call the Update method of the SqlDataAdapter class

8233. Performance issues occur & we collect sample timings of pages. We set the enabled attribute to true and the pageOutput attribute set to false for the Web.config's trace element
Trace Element - enabled attribute = true & pageOutput attribute = false

8234 Photo sharing app to download the image, first we ascertain the request for the photo download by creating an HttpHandler class, then process photo for format & return photo

8235.  DB accessed by web app, web & sql servers on separate servers we create a Web service, deploy it to the same network as the database server

8236 Application_error event: Create tracking number for errors after the exception is logged in the Application_Error event of the Global.asax file, we redirect to the customError.aspx page, pass tracking number in query string.

8237 Set up Authentication for a subdirectory add this code to the Web.config in the subdirectory.
<allow roles="TomatoSubscriber" />
<deny users="*" />

8238.Debug js by displaying fields of AJAX object in trace console in web form we choose to use Sys.Debug.traceDump

8239 Web form calls web service when page is accessed ensure two routines are called we have  Async="True" attribute has to be added to the Page directive.

3440.   Deploy app to server where there are more than one app is & the app is the only one that can modify certain files on the server,  After the application pool is configured to use a dedicated user account, we give access for the share to the user account.

3441. AddFileDependency When a batch process updates a xml file code segment: Response.AddFileDependency(fileDependencyPath);Response.Cache.SetCacheability(HttpCacheability.Public);

3442. Create a control in VS10 toolbox we'd use a custom server control

3443.  LINQ: var query =
from item in Items
where item.Books.All(b => b.Price <= 52)
select item;
All Items that have the price of the related magazine less than or equal to 52

3444.  Authorization info cashed: the cookieProtection attribute should be set to Encryption in the roleManager element of the Web.config

3445. Save ViewState info in SQL we'd use the SaveStateComplete event

3446. Create UI element we'd create a custom Web control.

3447. Store sensitive data that can be viewed in db, before we store sensitive data in the database, we'd use the Advanced Encryption Standard algorithm to encrypt the data.

3448. Site uses the SiteMapPath control connected to a sitemap & we need to configure a treeview.  After we configure a SiteMapDataSource control to use the XmlSiteMapProvider control, we configure the TreeView control to use the SiteMapDataSource control.

3449. Page that asks many questions & guides user though troubleshooting we'd choose to use MultiView control.

3450. Prevent bots from registering site:  Implement a Completely Automated Public Turing Tests (CAPTCHA) during the reg & login
& Send confirmation e-mail to new users. Disallow new user access until user responds to the e-mail message.

3451. No profile data stored in clear text we  First we create a custom profile provider. Before we store information in db, we ensure it's encrypted in the custom provider.

3452. Info able to be displayed in Excel we  use the DelimitedListTraceListener class.

3453.Users able to view updates on info from site  we supply a Really Simple Syndication (RSS) link adjacent to each product. And then we base the RSS feed on a Web service that returns updates for the product.

3454.  Authentication using existing db w/ table of UID & PW we'd  create a custom membership provider that has to be used.

3455. Users browsers specifies German we'd  rename the Default.aspx.es-ES.resx file to Default.aspx.es.resx.

3456. SQL SELECT Order.OrderID
,Order.Description
,OrderDetails.UnitPrice
FROM Order JOIN OrderDetails
ON Order.OrderID = OrderDetails.OrderID
LINQ from order in db.Ordersjoin details
in db.OrderDetails onorder.OrderID
equals details.OrderIDselect
new { order.OrderID, order.Description, details.UnitPrice};

9457. Web app renders in mobile devices Add a custom browser definition file to the application App_Browsers folder.
& Configure the application code to query the Capabilities property of the Request.Browser object

9458. DataPager control ensure it has properties exposed to webpardzone controls on all pages A zonelement element should be added to the WebPartZone control on each page.
& After the DataPagerControl control is copied into a new user control, we use the @Register directive to add a reference to the new user control in each page.

9259. Ensure web form w/ link button functions in browsers w/ js disabled the LinkButton control should be replaced with an HtmlInputSubmit control

9260. Databound ddl create an XML file in the App_Data directory to represent the data in the DropDownList control & bind the XmlDataSource control to the DataSource property of the DropDownList control.

9261. Set storage for session-state the session-state values stored in the StateServer state provider

9262. Dynamically added controls used for lifetime of page event after PostBack call the Page.ParseControl() method in the PreInit event of the page.

9263. Invoke web service asynchronously & execute tasks simultaneously we invoke the RegisterAsyncTask method.

9264. Reduce SQL injection:
 constrain & sanitize user input,
& use a least-privileged database account,
& use parameterized SQL statements.

9265. Dynamic Pricelist in master pages we After a custom master page is created for mobile-device browsers, modify the page that contains the price list to use device filters along with the MasterPageFile attribute of the @ Page directive.

9266. HTML stored in db & any scripts cannot be executed on browser use System.Web.HttpUtility.HtmlEncode() method

9267. Encrypt but not decrypt passwords we Encrypt passwords by using the Secure Hash algorithm before the passwords are stored in the db.

9268. Gridview using business object to select & update The DataSourceID property of the GridView control set to an ObjectDataSource instance that uses the business object.

9269. Calc time for all process requests we create and register a custom HttpModule class.

5970. Forms auth app & we make users access via AD we alter the membership provider to ActiveDirectoryMembershipProvider.

5971. Change RadioButtonLists to drop downs create a class that extends the WebControlAdapter class & register it in a browser file.

5972. Ensure VS10 automatically recognize new images added to project a Web site project we copy the files that are part of the application to the source folder of the application.

5973. Validate a user selects drop down selection that is not default selected we use RequiredFieldValidator .

5974. Control on each page at most 4 pages a SiteMapPath control added on each page, & the ParentLevelsDisplayed property set to 4

5975. App uses Forms auth & users can access sessions of other users we add to the Web.config <forms cookieless="UseCookies">

5976. Logging intermittent errors we create An event handler for the Application.Error event should be added to the Global.asax file of the app

5977. Consistent state management use ControlState

5978. Nested Masters After we create a nested master page that binds to existing master page, the reporting section-specific ContentPlaceHolder controls are added to the new master page. Then we configure content pages in the ~/Reporting folder, making it use the new master page

5979. Session State persistence we use the session-state values by using the SQLServer state provider

5980. Debug JS In IE enable script debugging

5981. Private key used to encrypt & decrypt we make use of the System.Security.ProtectedData class

5982. Data bound control built in sort we choose GridView

5983. Secure authentication cookie use a secure HTTP connection for any request that involves the transmission of an authentication cookie.

5984. ASP.NET AJAX app & a Web service returns data w/ compact format & minimum markup overhead we create a JSON Web service

5985. Implement data access for third party db's & prevents xss use parameterized SQL statements. .

5986. Web control provides data to other controls on page to third party db's use of an OleDbDataTableAdapter object.

5987. To Implement RSS we create & register a custom HttpHandler class that releases the RSS feeds & associate the HttpHandler class to the .rss extension.

5988. When page request is made provide page layouts & themes we have theme & master page have to be dynamically set in the PreInit event of each page.

Hope you enjoyed this content & the way it was presented.

That is all there will be more,

Catto

1 comment:

Nhu Phuong said...

Thank you. I think it's great