This is based on this article: A Complete URL Rewriting Solution for ASP.NET 2.0
Goals:
- Create a showcase example able to use URL rewriting to pass arbitrary urls to a handler page that uses masterpage. In other words, allow for a master.page enabled page to act as a 404 handler.
- Secondary goal is to simplify hive wiki application logic that deals with making debugger urls look like real world urls.
- Get to know ASP.NET 4.0 features
Steps:
- Created a default application
- Tried out the Visual Studio 2010 Debugger - It launched as http://localhost:8888/ with no need of an additional info on the url. Trying to look at /Home generated a 404 error
- Added some documentation to the home page about what article this tutorial is based on.
- Start implementing the code given in the article
- Create HTTP Module
- Links:
- Search for how to create HTTP module
- Walkthrough: Creating and Registering a Custom HTTP Module - http://msdn.microsoft.com/en-us/library/ms227673.aspx?ppud=4
- This looks like the better article - create the website, then add the module to it.
- No App_Code directory - just added ASP.NET handler module RewriteModule.cs
- Did this walkthrough directly, and it worked. Added HelloWorldModule.cs, and proper web config and it worked in my site too.
- How To Create an ASP.NET HTTP Module Using Visual C# .NET - July 2004 - http://support.microsoft.com/default.aspx/kb/307996?p=1
- Handling the configuration section - implement iConfigurationSectionHandler
- Links:
- So far unable to catch any breakpoints in RewriteModule
Labels:
None
Add Comment