PDA

View Full Version : Spring handler odd 404 behavior



sideout
04-10-2008, 06:15 PM
I trap errors using Application_Error in global.asax. I set customerrors mode="On" for testing purposes.

When I hit a page that does not exist

http://localhost/appPath/test/testlog.aspx

I get the following exception:


FileNotFoundException
Message: Unable to instantiate page [/test/testlog.aspx]: The file '/test/testlog.aspx' does not exist.
Source: Spring.Web
StackTrace
at Spring.Objects.Factory.Support.WebObjectUtils.Crea tePageInstance(String pageUrl) in c:\projects\daily\Spring.Net\src\Spring\Spring.Web \Objects\Factory\Support\WebObjectUtils.cs:line 129
at Spring.Web.Support.PageHandlerWrapper.CreatePageIn stance() in c:\projects\daily\Spring.Net\src\Spring\Spring.Web \Web\Support\PageHandlerFactory.cs:line 248
at Spring.Web.Support.PageHandlerWrapper.GetHandler(H ttpContext context) in c:\projects\daily\Spring.Net\src\Spring\Spring.Web \Web\Support\PageHandlerFactory.cs:line 226
at Spring.Web.Support.PageHandlerFactory.GetHandler(H ttpContext context, String requestType, String url, String physicalPath) in c:\projects\daily\Spring.Net\src\Spring\Spring.Web \Web\Support\PageHandlerFactory.cs:line 137
at System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

When I remove from web.config the handler for Spring.Web.Support.PageHandlerFactory I get the following exception:


HttpException
Message: The file '/appPath/test/testlog.aspx' does not exist.
Source: System.Web
StackTrace
at System.Web.UI.Util.CheckVirtualFileExists(VirtualP ath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildR esultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildR esultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVirtualPath ObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.Compilation.BuildManager.CreateInstance FromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper( HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.UI.PageHandlerFactory.System.Web.IHttpH andlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication.MapHandlerExecutionStep .System.Web.HttpApplication.IExecutionStep.Execute ()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously)

lahma
04-12-2008, 01:58 PM
Which version of Spring.NET are you using? There's a fix related to this in Spring.NET 1.1.1: http://jira.springframework.org/browse/SPRNET-838 .

-Marko

sideout
04-14-2008, 04:14 AM
Ah. I was using a nightly build pre 1.1.1. I'll give it a shot.

sideout
04-15-2008, 01:47 AM
Confirmed fixed in 1.1.1.