I have an aspx file Content.aspx
. When you visit content.aspx/FAQ
it uses the value in Request.PathInfo
to determine which content to load/display from the database (in this case, the FAQ data).
This works perfectly.
Until you pass /Content.aspx/FAQ
to Server.Execute()
. Then it throws an Exception that an error occurred executing the Handler for the page. When I dig into the InnerException, I see the message The file '/Content.aspx/FAQ' does not exist.
This leads me to believe that Execute()
is not handling PathInfo correctly and is instead treating as an actual part of the path on disk.
Is there a way to get the Execute()
method to properly handle these PathInfo parameters? Unfortunately it's too late now to change the way this application is doing this as this kind of 'parameter passing' is used throughout in lieu of traditional query strings for this purpose while query strings are used mostly for more complex parameters or in combination with PathInfo modifiers.