-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: MVP_mayank
Message 1 in Discussion
Canonicalization <o:p></o:p>
Canonicalization is the process by which various equivalent forms of a name
can be resolved to a single standard name, or the "canonical" name. For example, on a
specific computer, the names c:\dir\test.dat, test.dat, and ..\..\test.dat might all
refer to the same file. Canonicalization is the process by which such names are mapped
to a name that is similar to c:\dir\test.dat. <o:p></o:p>
When a URL is received by a Web server, the server maps the request to a
file system path that determines the response. The canonicalization routine that is
used to map the request must correctly parse the URL to avoid serving or processing
unexpected content. For more information about canonicalization, visit the following
Microsoft Web site: <o:p></o:p>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/THCMCh04.asp<o:p></o:p>
we can add more checks to help reduce canonicalization issues for a Web
application by adding an Application_BeginRequest event handler in their Global.asax
file that is stored in the root directory of the Web application. This event handler
executes for each Web request and is a convenient location to insert code to help
safeguard against canonicalization issues. <o:p></o:p>
Code sample<o:p></o:p>
The following samples demonstrate how to add an Application_BeginRequest event
handler to a Global.asax file. The event handler helps protect against invalid
characters and malformed URLs by performing path verifications to help protect against
common canonicalization issues. <o:p></o:p>
Global.asax code sample ( C#)
<script language="C#" runat="server">
void Application_BeginRequest(object source, EventArgs e) {
if (Request.Path.IndexOf('\\') >= 0 ||
System.IO.Path.GetFullPath(Request.PhysicalPath) != Request.PhysicalPath) {
throw new HttpException(404, "not found");
}
}
</script><o:p></o:p>
<o:p></o:p>
Tech. Thought Of The Day:
"HTML and WML are similar markup languages, more or less like Hindi and Urdu . As a
Hindi Speaker, you could grab the sense of what Urdu speaking people are saying, but
if you need to write correct Urdu, then that's a totally different story."<o:p></o:p>
Regards, <o:p></o:p>
Mayank Pujara <o:p></o:p>
([EMAIL PROTECTED])
Still single? Meet the perfect match. Join BharatMatrimony.com for FREE
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]