Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
93 Cards in this Set
- Front
- Back
- 3rd side (hint)
Default TCP port for HTTP traffic
|
80
|
|
|
Default TCP port for HTTPS traffic
|
443
|
|
|
What does HTTPS stand for?
|
Hypertext Transfer Protocol, Secure
|
|
|
What does SSL stand for?
|
Secure Socket Layer
|
|
|
Define the HTTP GET request method
|
Gets an object, such as a web page, from the web server. Should not have side effects.
|
|
|
URL
|
Uniform Resource Locator
|
|
|
URI
|
Uniform Resource Identifier
|
|
|
Define the HTTP HEAD request method
|
Identical to a GET request but without a response body. Useful for retrieving metadata information.
|
|
|
Define the HTTP POST request method
|
Submits data to be processed. The data is included in the body of the request. This may result in the creation of a new resource or an update to an existing resource.
|
|
|
Define the HTTP PUT request method.
|
Similar to a POST request but intended for the creation of a resource.
|
|
|
Define the HTTP DELETE request method
|
Deletes the specified resource.
|
|
|
Define the HTTP TRACE request method
|
Echos a request so that a client can see what (if any) changes or additions have been made by intermediate servers.
|
|
|
Define the HTTP OPTIONS request method
|
A request to for a list of the HTTP methods that the server supports.
|
|
|
Define the HTTP CONNECT request method
|
A request to converts the request to a transparent TCP/IP tunnel through an unencrypted HTTP proxy. Usually to facilitate SSL-encrypted communication.
|
|
|
Define the HTTP PATCH request method
|
A request to make partial modifications to a resource.
|
|
|
Define the HTTP DEBUG request method
|
A request to starts ASP.net debugging. Informs VS of the process to which the debugger will attach.
|
|
|
Describe the 1xx status code group
|
Informational. The request was received and the server is continuing to process.
|
|
|
Describe the 2xx status code group
|
Success. The request was received, understood, accepted.
|
|
|
Describe the 3xx status code group
|
Redirect. The client must access a different resource instead.
|
|
|
Describe the 4xx status code group
|
Client Error. The request had a client error or the server does not know how to fulfill the request.
|
|
|
Describe the 5xx status code group
|
Server Error. The server understood the request but failed to fulfill it.
|
|
|
Describe the Response Status Code 100
|
Continue
|
|
|
Describe the Response Status Code 200
|
OK
|
|
|
Describe the Response Status Code 201
|
Created
|
|
|
Describe the Response Status Code 300
|
Redirection with Multiple Choices
|
|
|
Describe the Response Status Code 301
|
Moved Permanently
|
|
|
Describe the Response Status Code 302
|
Found... Moved temporarily. Client should continue to use URI.
|
|
|
Describe the Response Status Code 400
|
Bad Request
|
|
|
Describe the Response Status Code 401
|
Unauthorized
|
|
|
Describe the Response Status Code 403
|
Forbidden
|
|
|
Describe the Response Status Code 404
|
Not found
|
|
|
Describe the Response Status Code 407
|
Proxy Authentication Required
|
|
|
Describe the Response Status Code 405
|
Method not allowed
|
|
|
Describe the Response Status Code 408
|
Request time-out
|
|
|
Describe the Response Status Code 413
|
Request too long
|
|
|
Describe the Response Status Code 500
|
Internal server error
|
|
|
Describe the Response Status Code 501
|
Not implemented. Server does not recognize the request method and is not capable of supporting it for any resource. (Compare to 405 - method not allowed)
|
|
|
What does MIME stand for?
|
Multipurpose Internet Mail Extensions
|
|
|
What is the Content-Type header for and what is it's format. Give an example.
|
The Content-Type indicates the type of resource that is being sent to the web browser. It is in the form of a MIME type of two-parts, type/subtype.
|
|
|
What is the App_Browsers folder for?
|
The App_Browsers folder contains custom browser definition files (.browser files) that ASP.net uses to identify browsers and determine their capabilities. (see page 23)
|
|
|
How do you put C# or VB code in the ASPX file?
|
<%@ Page Language="VB|C#" %>
<script runat="server"> code here </script> |
|
|
What is the markup called that is used to set up the environment and specify how the page should be processed?
|
Page directives
|
|
|
What are FrontPage Server Extensions?
|
FrontPage Server Extensions allow MS FrontPage clients to communicate with web servers, and provide additional functionality intended for websites.
It has security problems. It relies on HTTP for communication and CGI/POST for server-side processing. Most .NET products switched to WebDAV, but VS 2005 & 2008 still publishes ClickOnce applications to websites using these extensions. |
|
|
What is WebDAV?
|
Web-based Distribute Authoring and Versioning.
Based on HTTP, the WebDAV protocol makes the web a read/write medium. |
|
|
List the ASP.net 4.0 configuration hierarchy in the order that they are processed by the ASP.net run-time.
Name the path for extra credit. |
%SystemRoot%\Microsoft .NET\Framework\<versionNumber>\CONFIG\Machine.config
%SystemRoot%\Microsoft .NET\Framework\<versionNumber>\CONFIG\Web.config <wwwroot>\Web.config <wwwroot>\<web_app>\Web.config <wwwroot>\<web_app>\<dir>\Web.config |
|
|
Describe the execution life-cycle of an ASP.net MVC HTTP request.
|
1. Receive request, look up Route object in RouteTable and create RouteData object.
2. Create RequestContext instance. 3. Create MvcHandler and pass RequestContext to handler. 4. Identify IControllerFactory from RequestContext. 5. Create instance of class that implements ControllerBase. 6. Call MyController.Execute method. 7. The ControllerActionInvoker determines which action to invoke on the controller and executes it, which results in calling the model and returning a view. http://blog.codeville.net/2007/11/20/aspnet-mvc-pipeline-lifecycle/ |
|
|
Name the class used to map an area with the routing engine.
|
AreaRegistration class
|
|
|
After DataAnnotations are applied to model classes, how do you check for and display validation errors in MVC?
|
In the controller class's POST action, check the Model.IsValid property. If the model is not valid, return the view.
Add <%: Html.ValidationSummary(..) %> to the view to display the error. Add <%: Html.ValidationMessageFor(...) %> near the field to display property errors. |
|
|
What parameter type is passed to an MVC action method during a form post?
|
FormCollection
|
|
|
What are two ways of passing data to MVC views?
|
ViewDataDictionary and strongly typed views.
|
|
|
Name a few predefined action filters
|
AuthorizeAttribute, OutputCacheAttribute, HandleErrorAttribute
|
|
|
How are action filters applied
|
as attributes on actions or
|
|
|
What do standard MVC views inherit from?
|
ViewPage class
|
|
|
What does the MVC ViewPage class inherit from?
|
Page class (same as web form pages)
|
|
|
What do standard MVC master views inherit from?
|
MasterViewPage class
|
|
|
What do standard MVC partial views inherit from?
|
ViewUserControl class
|
|
|
What does the MVC class MasterPageView inherit from?
|
UserControl class (same as web form user controls)
|
|
|
What does AJAX stand for?
|
Asynchronous JavaScript and XML
|
Ajax is really a set of technologies working together:
* XHTML and CSS for markup * DOM for dispaly & interaction * XML and XSLT for data interchange & manipulation * JSON for marshalling objects * XMLHttpRequest for asynchronous communication * JavaScript |
|
What does JSON stand for?
|
JavaScript Object Notation
|
|
|
What is a generic HTTP handler and how do you implement one?
|
A generic handler is a code file with an ASHX extension that contains a class that implements IHttpHandler. It's the default HTTP handler for all web handlers that do not have a UI and that include the @WebHandler directive.
|
The default HTTP handler for all web handlers that do not have a UI and that include the @WebHandler directive.
|
|
Name the four build-in HTTP handlers in ASP.net
|
1. ASP.net page handler (*.aspx)
2. Web service handler (*.asmx) 3. Generic Web handler (*.ashx) 4. Trace handler (trace.axd) |
Hint:
1. (*.aspx) 2. (*.asmx) 3. (*.ashx) 4. (trace.axd) |
|
What class/control manages script libraries, files, partial-page rendering, and client proxy class generation for Web and application services?
|
System.Web.UI.ScriptManager
|
This class is in the System.Web.UI namespace
|
|
In MVC, what is a route constraint and how do you implement your own?
|
When you map a route in MVC, you have the option of specifying a constraint on that route so that only matching Urls will use. You can use regular expression, or provide a custom route constraint by implementing IRouteConstraint.
|
|
|
By default, ASP.net will serve up files that exist. How can you by-pass this behavior and force all requests to be handled by ASP.net routing instead?
|
Set RouteCollection.RouteExistingFiles = true.
By default, this property is false which allow ASP.net to serve up existing files. |
|
|
In an ASP.net MVC application, how do you explicitly bypass routing for certain requests?
|
Call RoutingCollectionExtensions.IgnoreRoute("{route pattern}")
|
|
|
In an MVC action method, list the 6 ways to return a redirect result to the client
|
return Redirect("{url}") // RedirectResult
return RedirectPermanent("{url}") // RedirectResult return RedirectToAction("{action}", "{contoller}") // RedirectToRouteResult return RedirectToActionPermanent("{action}", "{contoller}") // RedirectToRouteResult return RedirectToRoute("{route name}"); // RedirectToRouteResult return RedirectToRoutePermanent("{route name}"); // RedirectToRouteResult |
|
|
How do you ensure that an MVC action can be called asynchronously?
|
Have the controller derive from AsyncController and implement {ActionName}Async and {ActionName}Completed methods. Use the AsyncManager make the callback to the completed method. ***
|
http://msdn.microsoft.com/en-us/library/ee728598.aspx
|
|
How do you specify a web pages master page in ASPX markup?
|
<%@ Page MasterPageFile="~/MySite.master" %>
|
|
|
How do you specify a master page for a site, application, or folder?
|
Web.config
<pages MasterPageFile="~/MySite.master" /> |
|
|
Which control is required when defining a master page?
|
You must have at least one ContentPlaceHolder control defined when implementing a master page.
|
|
|
Which control is used to define content when implementing a content page?
|
Typically one Content control for each ContentPlaceHolder defined on the master page is used.
|
|
|
Describe how to expose master page members to content pages.
|
Coupling your master page to content pages is usually a bad idea. An alternative might be to expose a master page event to the content pages.
|
Add the @ MasterType declaration to the content pages. Then access the instance using the Master property of the content page.
<%@ MasterType VirtualPath="~\Site.master" %> or <%@ MasterType TypeName="SiteMaster" %> |
|
How does applying Theme settings behave differently from applying StyleSheetTheme settings?
|
Settings are applied in the following order:
StyleSheetTheme > Page > Theme |
|
|
In what project folder are themes placed?
|
App_Themes
|
|
|
In what windows folder are global themes placed?
|
<wwwroot>\aspnet_client\system_web\<version>\Themes
|
|
|
Caching: Name and describe the two types of caching in ASP.net
|
Application Caching (also called application data caching) is the process of storing data in a cache object. Page.Cache.Insert(...)
Page output caching is the process of storing a rendered page, portion of a page, or version of a page in memory. |
|
|
OutputCache: How do you apply a cache substitution?
|
static string MethodName(HttpContext context)
{ return {substitution string}; } <asp:Substitution runat="server" methodname="MethodName" /> |
It's important that the callback method name be static (although it doesn't appear to need to be public).
|
|
When using a cache validation callback, what happens when you set the HttpValidationStatus parameter to Invalid?
|
This causes the page to be generated. The newly generated page is stored in the cache, replacing an earlier cached version.
|
|
|
When using a cache validation callback, what happens when you set the HttpValidationStatus parameter to IgnoreThisRequest?
|
This causes the page to be generated WITHOUT invalidating the previously cached version of the page. The generated page output is NOT cached and future requests might receive the previously cached output.
|
|
|
When using a cache validation callback, what happens when you set the HttpValidationStatus parameter to Valid?
|
This causes ASP.net to return the cached version of the page.
|
|
|
How do you control view state encryption for an entire ASP.net web site?
|
<configuration>
<system.web> <pages viewStateEncryptionMode = "Always | Auto | Never" /> </system.web> </configuration> |
|
|
How do you control view state encryption for an ASP.net page?
|
<%@ Page ... ViewStateEncryptionMode = "Always | Auto | Never" />
|
|
|
What is ViewStateEncryptionMode.Auto?
|
ViewStateEncryptionMode.Auto is the default encryption mode in ASP.net. It enables encryption to be controlled at the control by calling the RegisterRequiresViewStateEncryption method.
|
|
|
How do you disable view state for an ASP.net page or control?
|
Set EnableViewState = "False" OR set ViewStateMode = "Disabled"
|
|
|
How do you disable view state for an entire page, except for specific controls?
|
Set the pages ViewStateMode = "Disabled" and set the ViewStateMode of the controls to "Enabled". For this to work, EnableViewState must be set to true on the page and the controls.
|
You might do this to optimize page load time by reducing the size of the page.
|
|
Describe the ClientIDMode property and enumeration.
|
Gets or sets the algorithm that is used to generate the value of the ClientID property.
AutoID: ClientID is generated by concatenating the ID values of each parent container with the ID of the control. An incremental value (ctl00_) is inserted in front of the control's ID. Used in ASP.net prior to version 4.0. Static: The ClientID is set to the ID property of the control. Predictable: The ClientID is generated by concatenating the ClientID of the parent with the ID of the control. If the control is generated by a multi-row control (such as a grid) the ClientIDRowSuffix property is added at the end, or a sequential number is added at the end if ClientIDRowSuffix is blank. |
|
|
When working with ApplicationState, what must be done to avoid concurrency problems.
|
Application.Lock()
Application.Unlock() |
|
|
Name two ways to access the Session state bag.
|
Page.Session
HttpContext.Session |
|
|
How can you disable session state for an entire web application?
|
<configuration>
<system.web> <sessionState mode="off"/> </system.web> </configuration> |
|
|
How can you disable session state for a specific web page?
|
<%@ Page EnableSessionState="False" %>
|
|
|
Web Parts: How do you establish a static connection?
|
1. Create a provider web part (UserControl). Create a public method that will return data to the Consumer. Decorate the method with the ConnectionProvider attribute.
2. Create a consumer web part. Create a public method that will receive data from the Provider. Decorate the method with the ConnectionConsumer attribute. 3. Create a web page with a WebPartManager control and at least one WebPartZone container. 4. Add the Provider and Consumer to the web part zone created above. 5. Add <StaticConnection> <asp:WebPartConnection> to WebPartManager and set the following attributes of the connection control: ID ProviderID - the provider ID of the control added in step 4 ProviderConnectionPointID - the name of the method that will provide data ConsumerID - the consumer ID of the control added in step 4 ConsumerConnectionPointID - the name of the method that will consume data |
|
|
In which folder should global resources go in?
|
App_GlobalResources
|
|
|
In which folder should local resources go in?
|
App_LocalResources
|
|