February 2, 2002

Code Access Security in the .NET Framework

n case you ask yourself how this security model can be useful, just consider if the Windows operating system could currently apply a CAS such that no code downloaded from the Internet as a mail attachment was allowed to run (no matter if who’s running Outlook Express is the computer

ASP.NET process recycling

Application recycling is a great feature that lets you configure an application so that ASP.NET automatically shuts it down and restarts it after a given period or a given number of client requests, or when it consumes more memory than the specified threshold. This feature is a lifesaver if the

Discern among servers with the MachineName property

As in classic ASP, you can use the Server object from inside any ASP.NET application. This property returns a reference to an HttpServerUtility class.The HttpServerUtility class exposes only two properties: ScriptTimeout (the timeout in seconds for a request) and the new MachineName property, which returns the name of the server

Sending files to the browser

The ASP.NET Response object has been greatly expanded in its capability to send output to the client browser. For example, the WriteFile method can send the contents of any text, HTML, or XML file to the browser; in classic ASP you have to load the file in memory and then

Saving HTTP requests for better debugging

The new SaveAs method of the Request object saves the current HTTP request to a file, which can be very useful for logging and debugging reasons. You should pass True to its second argument if you want to save HTTP headers as well: Request.SaveAs “c:lastrequest.txt”, True The saved file contains

Parse URLs with the System.Uri class

The Url and UrlReferrer properties of the Request ASP.NET object return a reference to the URL of the page and the URL of the page that referred to this one. Both properties return a System.Uri object; you can query the properties of this object to learn more about the address

Using String-based Data Validation

hat do a command shell, an online ordering system, and a report generator application have in common? Not much, really. Yet they all base their operation on an external source of data, be it a human user or a data file. By their nature, such applications must be prepared to