Paladin Consultants, LLC

"Good Information is just good business"

JA slide show
Home Resources ASP.Net Applications
Print E-mail

ASP.Net is the technology platform that is part and parcel of the Microsoft .Net framework which is designed to help build web applications. Whether the web applications are needed to be internet Internet oriented, or designed to provide information within the organization, the new ASP.Net technology is designed to deliver powerful sophisticated web forms and services to a browser independent community. Early binding, managed code, and viewstate techniques make for a much faster and capable information delivery and transfer between the client and server without the need for session variables and cookies.

ASP.Net is managed using a system of XML configuration files that hold information about how ASP is implemented on a machine level, .Net level, and on an application basis. The file machine.config is in the winnt\Microsoft.Net\Framework\version\Config directory, and contains default information regarding the setup of asp.net ASP.Net on that machine. For applications, web.config resides in the project application’s directory and inherits properties from the machine.config file. However, it can override those settings, and is used to define session states, security, and the like. Secondary web.config files can be in any subdirectory belonging to the project application, inherits properties from the two preceding files, and can be used to override some of those properties with respect to the files in its own subdirectory. You can use any standard text editor or XML parser to create and edit ASP.NET ASP.Net configuration files.

At runtime, the .Net application finds the config files, and uses that information to determine how to implement the application. As changes to those config files are detected during the running of the application, changes in the implementation are made accordingly.

The essence of ASP.Net is that it allows the creation of dynamic web pages using information from the server to write the HTML delivered to the client. This is distinct from dynamic HTML (DHTML) where the client (desktop) writes the HTML output before it is rendered by the browser. ASP pages use database output from the server, or controls from the server to create the webpage before it is delivered to the desktop, or the page is partially formed, and output from the server is inserted into the code before it is delivered to the browser.

ASP.Net also has an elaborate security system of its own which integrates with Windows Security, and IIS Security to prevent unauthorized access to data or files on the server.

The Page Object

The Page object Object is the primary vehicle for expressing and requesting information from the server. Request, Response, Server, Application, and Session objects are now part of the page object under ASP.Net. Of these, the Request, and Response classes are the most important.

The Request class is used to request information from the server. Its properties and methods are listed below.

Public Properties

AcceptTypes

Gets a string array of client-supported MIME accept types.

ApplicationPath

Gets the ASP.NET application's virtual application root path on the server.

Browser

Gets information about the requesting client's browser capabilities.

ClientCertificate

Gets the current request's client security certificate.

ContentEncoding

Gets or sets the character set of the entity-body.

ContentLength

Specifies the length, in bytes, of content sent by the client.

ContentType

Gets or sets the MIME content type of the incoming request.

Cookies

Gets a collection of cookies sent by the client.

CurrentExecutionFilePath

Gets the virtual path of the current request.

FilePath

Gets the virtual path of the current request.

Files

Gets the collection of client-uploaded files (Multipart MIME format).

Filter

Gets or sets the filter to use when reading the current input stream.

Form

Gets a collection of form variables.

Headers

Gets a collection of HTTP headers.

HttpMethod

Gets the HTTP data transfer method (such as GET, POST, or HEAD) used by the client.

InputStream

Gets the contents of the incoming HTTP entity body.

IsAuthenticated

Gets a value indicating whether the user has been authenticated.

IsSecureConnection

Gets a value indicting whether the HTTP connection uses secure sockets (that is, HTTPS).

 

Gets the specified object in the Cookies, Form, QueryString or ServerVariables collections.

In C#, this property is the indexer for the HttpRequest class.

Params

Gets a combined collection of QueryString, Form, ServerVariables, and Cookies items.

Path

Gets the virtual path of the current request.

PathInfo

Gets additional path information for a resource with a URL extension.

PhysicalApplicationPath

Gets the physical file system path of the currently executing server application's root directory.

PhysicalPath

Gets the physical file system path corresponding to the requested URL.

QueryString

Gets the collection of HTTP query string variables.

RawUrl

Gets the raw URL of the current request.

RequestType

Gets or sets the HTTP data transfer method (GET or POST) used by the client.

ServerVariables

Gets a collection of Web server variables.

TotalBytes

Gets the number of bytes in the current input stream.

Url

Gets Information about the URL of the current request.

UrlReferrer

Gets information about the URL of the client's previous request that linked to the current URL.

UserAgent

Gets the raw user agent string of the client browser.

UserHostAddress

Gets the IP host address of the remote client.

UserHostName

Gets the DNS name of the remote client.

UserLanguages

Gets a sorted string array of client language preferences.

Public Methods

BinaryRead

Performs a binary read of a specified number of bytes from the current input stream.

Equals (inherited from Object)

Overloaded. Determines whether two Object instances are equal.

GetHashCode (inherited from Object)

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

GetType (inherited from Object)

Gets the type of the current instance.

MapImageCoordinates

Maps an incoming image-field form parameter to appropriate x/y coordinate values.

MapPath

Overloaded. Maps the virtual path in the requested URL to a physical path on the server for the current request.

SaveAs

Saves an HTTP request to disk.

ToString (inherited from Object)

Returns a String that represents the current Object.

ValidateInput

Validates data submitted by a client browser and raises an exception if potentially dangerous data is present.

 

The Response class is used to write to the browser. We reproduced its properties and methods below.

 

February 11, 2008collection.

Buffer

Gets or sets a value indicating whether to buffer output and send it after the entire response is finished processing.

BufferOutput

Gets or sets a value indicating whether to buffer output and send it after the entire page is finished processing.

Cache

Gets the caching policy (expiration time, privacy, vary clauses) of a Web page.

CacheControl

Sets the Cache-Control HTTP header to Public or Private.

Charset

Gets or sets the HTTP character set of the output stream.

ContentEncoding

Gets or sets the HTTP character set of the output stream.

ContentType

Gets or sets the HTTP MIME type of the output stream.

Cookies

Expires

Gets or sets the number of minutes before a page cached on a browser expires. If the user returns to the same page before it expires, the cached version is displayed. Expires is provided for compatiblility with previous versions of ASP.

ExpiresAbsolute

Gets or sets the absolute date and time at which to remove cached information from the cache.

ExpiresAbsolute is provided for compatibility with previous versions of ASP.

Filter

Gets or sets a wrapping filter object used to modify the HTTP entity body before transmission.

IsClientConnected

Gets a value indicating whether the client is still connected to the server.

Output

Enables output of text to the outgoing HTTP response stream.

OutputStream

Enables binary output to the outgoing HTTP content body.

RedirectLocation

Gets or sets the value of the Http Location header.

Status

Sets the Status line that is returned to the client.

StatusCode

Gets or sets the HTTP status code of the output returned to the client.

StatusDescription

Gets or sets the HTTP status string of the output returned to the client.

SuppressContent

Gets or sets a value indicating whether to send HTTP content to the client.

Public Methods

AddCacheItemDependencies

Makes the validity of a cached item dependent on other items in the cache.

AddCacheItemDependency

Makes the validity of a cached item dependent on another item in the cache.

AddFileDependencies

Adds a group of file names to the collection of file names on which the current response is dependent.

AddFileDependency

Adds a single file name to the collection of file names on which the current response is dependent.

AddHeader

Adds an HTTP header to the output stream.

AddHeader is provided for compatibility with previous versions of ASP.

AppendHeader

Adds an HTTP header to the output stream.

AppendToLog

Adds custom log information to the IIS log file.

ApplyAppPathModifier

Adds a session ID to the virtual path if the session is using cookieless session state and returns the combined path. If cookieless session state is not used, ApplyAppPathModifier returns the original virtual path.

BinaryWrite

Writes a string of binary characters to the HTTP output stream.

Clear

Clears all content output from the buffer stream.

ClearContent

Clears all content output from the buffer stream.

ClearHeaders

Clears all headers from the buffer stream.

Close

Closes the socket connection to a client.

End

Sends all currently buffered output to the client, stops execution of the page, and raises the Application_EndRequest event.

Equals (inherited from Object)

Overloaded. Determines whether two Object instances are equal.

Flush

Sends all currently buffered output to the client.

GetHashCode (inherited from Object)

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

GetType (inherited from Object)

Gets the type of the current instance.

Pics

Appends a PICS-Label HTTP header to the output stream.

Redirect

Overloaded. Redirects a client to a new URL.

RemoveOutputCacheItem

Static method removes from the cache all cached items associated with the specified path.

ToString (inherited from Object)

Returns a String that represents the current Object.

Write

Overloaded. Writes information to an HTTP output content stream.

WriteFile

Overloaded. Writes the specified file directly to an HTTP content output stream.



 Resources

    * Tutorial List on ASP.Net

This resource provides comprehensive list of tutorials on ASP.Net.

    * Useful Information on ASP.Net

This is an excellent resource on ASP.Net.
 
Bookmark and Share