Quiz 2 Flashcards

1
Q

What is TLS/SSL?

A

TLS/SSL is an internet protocol that lets you transmit data over the internet using encryption. This prevents others from reading that data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is required to make use of TLS/SSL?

A

For TLS/SSL to work, both the browser and the server need an TLS/SSL certificate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a certification authority?

A

A certification authority is an organization that certifies that websites belong to who they say they do.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the highest strength that SSL currently has available?

A

128-bit SSL is the highest SSL strength available.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Before you can use the HTTPS protocol, what must you do?

A

Before using the HTTPS protocol, you must first create a binding for it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What do certificate problems potentially indicate?

A

Certificate problems can potentially indicate that the site you’re visiting is not authentic, or that it is attempting to intercept data that is being sent to it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the two types of certificates? Compare and contrast.

A

The two types of certificates are single root and chained root. Single root certificates are from a single, trusted source, are stable, and are easy to install. Chained root certificates inherit another certificate; they are cheaper, but less stable and harder to install.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is state view?

A

State view is how ASP.net handles passing values from one page and its control properties to another page, between executions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does state view work?

A

Whenever a page is posted back to the client, changes that have been made by the program to the properties and controls of the page are recorded and encoded in a string in a hidden field, called “_VIEWSTATE”.
Once the page is posted back to the server, ASP.net uses _VIEWSTATE to restore the page and its controls & properties.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the most important thing to remember about view state?

A

The most important thing to remember about view state is that it is not used to restore data that the user enters into controls (i.e. textboxes and such) unless that control is tied into a change event.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How does view state interact with data-bound controls?

A

A data-bound control that has view state enabled loses its binding when the page is reposted, instead using _VIEWSTATE to restore values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are two cases in which you might want to disable view state?

A

Two situations in which view state might best be disabled would be:
In any situation in which control properties might affect how the page is laid out after they are restored.
When the _VIEWSTATE gets so large that it impacts performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How would you disable view state for a control? An entire page? A whole application? How would you enable them?

A

To disable view state for a control, you would set a control’s EnableViewState property to False.
To disable view state for a page, you would set the page’s EnableViewState property to False.
To disable an entire application’s view state, you would set the EnableViewState attribute of the pages element within system.web to False.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How would you determine the size of a page’s view state?

A

To view the size of a page’s view state, you must first set the trace attribute of the page directive to true. Then scroll down to the control tree section of the trace output to see the size.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a cookie?

A

A cookie is a name/value pair that is stored on the client’s computer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How is a cookie sent?

A

A cookie is sent by a web application to a browser via an HTTP response. Then, whenever a browser sends an HTTP request to the server, it attaches any appropriate cookies to the response.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How does ASP.net use cookies?

A

ASP.net uses cookies as a way to store the session ID for sessions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the difference between a session cookie and a persistent cookie?

A

A session cookie is a cookie that’s kept in the browser’s memory and exists only until the browser session ends. A persistent cookie exists on the user’s hard disk and is retained until the cookie’s expiration date.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

How is creating a persistent cookie different than a session cookie?

A

To create a session cookie, you simply state a name and value. To create a persistent cookie, you must also specify the Expires property with a date and time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is URL encoding? Why is it important?

A

URL encoding is when a query string is appended to a URL, which itself contains name/value pairs. These pairs can be used to pass information from one page of an application to another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What special character denotes a query string at the end of a URL? What comes after that?

A

A question mark (“?”) is the special character that denotes a query string after a URL. After the question mark follows the name of the attribute, an equal sign, and the value of the attribute.

22
Q

If you wanted to code more than one attribute with a query string, how would you concatenate them?

A

Query strings are concatenated using an ampersand (“&”) between each name/value pair.

23
Q

What is the generally-accepted max length of a URL?

A

Generally, most browsers will accept URLs of at least 2,000 characters.

24
Q

What are the two benefits of friendly URLs?

A

There are two key benefits to friendly URLs:

  1. Search engine optimization takes advantage of friendly URLs.
  2. Friendly URLs are easier to read for the user.
25
Q

What’s the difference between FriendlyUrls and ASP.net routing?

A

While both FriendlyUrls and ASP.net routing allow for friendly URLs, ASP.net routing must be coded manually. However, ASP.net routing gives a finer degree of control over the navigation structure of your site.

26
Q

How does ASP.net routing separate navigation from structure?

A

ASP.net routing doesn’t care where a page file is located within the directory that makes up the site’s structure; it can format URLs to make them appear as if a page exists anywhere within the site.

27
Q

What is the name of the object that changes the default behavior of friendly URLs?

A

The resolver object can be customized to change the default behavior of friendly URLs.

28
Q

What are the three layers of a three-layer application?

A

The three layers of a three-layer application are:

  • Presentation
  • Middle
  • Database
29
Q

What is contained within the presentation layer?

A

Within the presentation layer of a three-layer application, there are the ASP.net pages that manage the appearance of the application. This can also include bound data controls, and objectDataSource controls.

30
Q

What is contained within the middle layer?

A

The middle layer of a three-layer application contains data access classes. These manage the data access for the application. It can also contain business entities.

31
Q

What is contained within the database layer?

A

The database layer of a three-layer application contains the actual database that contains the data of the application.

32
Q

What is the difference between a object data source and an SQL data source?

A

The difference between an object data source and an SQL data source is that, unlike an SQL data source, an object data source does not access the database directly, instead going through data access classes (middle layer).

33
Q

What are the three ADO.net classes that you can use with object data sources?

A

The three ADO.net classes that you can use with object data sources are:

  • SqlConnection
  • SqlCommand
  • SqlDataReader
34
Q

Within the ASP.net file structure, where are data access classes placed?

A

Data access classes are placed within the Model folder of an application, along with all other classes.

35
Q

What does the ADO in ADO.net stand for?

A

The ADO in ADO.net stands for “ActiveX Data Objects”.

36
Q

How would you execute an SQL statement against an SQL database using ADO?

A

To execute an SQL statement against an SQL database using active data objects, you would have to create an SQLCommand object that contains the SQL statement you want to execute.

37
Q

What are the two methods of the SQLConnection class?

A

The SQLConnection class has the Open() and Close() methods.

38
Q

When using the ExecuteNonQuery method of the SQLCommand class, how can you tell if the command was successful?

A

The SQLCommand’s ExecuteNonQuery method returns the number of rows that were affected by the command it executed; thus, if it was successful, it would return a number above 0.

39
Q

What are the four methods of the ObjectDataSource control?

A

The four methods of the ObjectDataSource control are:

  • SelectMethod
  • UpdateMethod
  • DeleteMethod
  • InsertMethod
40
Q

What are the two properties of the ObjectDataSource class?

A

The two properties of the ObjectDataSource class are TypeName and SelectMethod. TypeName is particularly important, as it identifies the data access class that is providing the data.

41
Q

What is a view? Why are they important?

A

A view is a predefined query that’s stored in a database. They’re useful because they can provide what is, in essence, a saved, pregenerated table for use, which may allow greater security, or better usability.

42
Q

What command is used to create a view?

A

To create a view, you would use the SQL command CREATE VIEW instead of SELECT.

43
Q

What is a stored procedure? How would you create one? How do you signify user-designated variables?

A

A stored procedure is an SQL statement (not a query) that is stored on the database. They are created by preceding the INSERT, UPDATE, or DELETE statement with CREATE PROCEDURE AS.
To designate a specific variable as user-defined, you would proceed that variable with the “@” sign.

44
Q

What does ADO.NET use to handle the flow of data between a database and a data set?

A

ADO.NET uses a data adapter to manage the flow of data between a database and a data set.

45
Q

What is the difference between a database and a data set?

A

A data set is where data retrieved from a database is stored, within one or more data tables. Then the data in the data tables can be displayed in controls on the page.

46
Q

What are the two types of objects that ADO.NET uses to access data in databases?

A

The two types of objects that ADO.NET uses to access data in a database are:

  • Datasets, which contain one or more data tables
  • .NET Data Providers, which include data adapters, commands, and connections
47
Q

How does a data adapter object retrieve data from a database in order to put it in a data table?

A

For a data adapter to retrieve data from a database and put it in a data table, it must issue a SELECT statement stored in a command object (such as is found in .NET Data Providers). That command object then uses a connection object to connect to the database and pull the data.

48
Q

How are the ADO.NET objects implemented? By what classes?

A

To implement the ADO.NET data objects, you would need to import the classes from System.Data

49
Q

What are concurrency problems? How are they possible?

A

Concurrency problems arise when two or more users attempt to update the same row in a database. This is possible because when a program retrieves data from a database, the connection is dropped, preventing the database manager from managing the update process.

50
Q

What is optimistic concurrency? What is its alternative?

A

Optimistic concurrency is a method of dealing with concurrency errors; basically, before a row is updated, it is checked to see if it has been updated since it was last retrieved. If it has, that means that someone has updated it between being pulled, and the update being sent, and thus it rejects the update.
The alternative is “last in wins”, where basically the last update overrides all that came before it, no checking involved. This can corrupt databases, though.

51
Q

Under what circumstances does ASP.NET use view state to store data entered by a user?

A

ASP.NET only stores user data in view state when the control responds to change events.