|
I must be so close, but I just can't get it. First, App_Code\MyPageFactory.vb: Imports System Imports System.IO Imports System.Web Imports System.Web.UI Imports Microsoft.VisualBasic Public Class MyPageFactory Implements IHttpHandlerFactory Public Function GetHandler(ByVal context As System.Web.HttpContext, ByVal requestType As String, ByVal url As String, ByVal pathTranslated As String) As System.Web.IHttpHandler Implements System.Web.IHttpHandlerFactory.GetHandler context.Items("FileName") = Path.GetFileNameWithoutExtension(url).ToLower Return PageParser.GetCompiledPageInstance(url, context.Server.MapPath("~/City.aspx"), context) End Function Public Sub ReleaseHandler(ByVal handler As System.Web.IHttpHandler) Implements System.Web.IHttpHandlerFactory.ReleaseHandler End Sub End Class The web.config: <add verb="*" path="Belmont/*.aspx" type="MyPageFactory"/> So I try to load up http://localhost/politics/Belmont/Default.aspx but all I get is a 404 error. I've verified that politics is an IIS application. Any ideas?
|