Running .Text on ASP.NET 2.0

I finally managed to get .Text working with ASP.NET 2.0. Here's how:

  • Add the following to the httpHandlers section of Web.config:

    <add verb="*" path="*.aspx" type="Dottext.Common.UrlManager.UrlReWriteHandlerFactory,Dottext.Common" />

  • Change the method ProccessHandlerTypePage in the Dottext.Common.UrlManager.UrlReWriteHandlerFactory class. The documentation states that the GetCompiledPageInstance method “supports the .NET Framework infrastructure and is not intended to be used directly from your code.“ Hence, they obviously allowed themselves to change the behavior of this method. The first parameter is supposed to be “the virtual path to the requested file,“ but when you point it to an existing file, that is different from the actual one you want compiled, it processes it instead. I'm not sure this is the right way to do this, though, but it seems to work:

    return PageParser.GetCompiledPageInstance(pagepath.Substring(pagepath.LastIndexOf('\\') + 1), pagepath, context);

  • Additional (nonmandatory) changes I made:
    • Migrating the database to SQL 2005 (Importatnt note: when you use sp_attach_db [no SQL Express Manager yet] to connect the database, it will convert it to a new format, and you will not be able to attach it to a SQL 2000 server anymore. So create a backup prior to attaching.)
    • Changing all the System.Collections classes to their equivalent System.Collections.Generic classes (and removing all unnecessary casts) for better performance.
    • Moving from the code-behind scheme of ASP.NET 1.0/1.1 to partial classes.

I may post the code at the .Text workspace when I get the time to finish it.

Published Monday, July 26, 2004 10:24 PM by aelij
Filed under: ,

Comments

# re: Running .Text on ASP.NET 2.0

Tuesday, November 13, 2007 4:19 PM by discoverahqwenmx

Hello! I'm a single mom of 2 children and have mediocre credit. I learned that my credit rating is called fair and I need some time to get a good score. For that I applied and now use 2 credit card and stick to the payment schedule. I'm glad to see my credit boost since I got the idea of this at

<a href="immidetlycardd.info/discover-interest-months-sears.html">sears discover card no interest for 12 months</a>

<a href="inminutes-cardd.info/discover-interest-months-12.html">discover 0% interest 12 months</a>

5Hn65HTx2t

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Please add 4 and 1 and type the answer here:

Enter the numbers above: