I found that to0 and my way around it was to create a virtual folder in IIS
with an index.htm or whatever default page type works for you in it. Then I
put a response redirect in the index.htm/aspx

I couldn't find any other way to do what you were after without the .aspx on
the end. I suspect it needs the extension so it can figure out what to do
with the file, if/how to serve it up.

not much help maybe...
cheers,
Stephen

On Tue, Mar 9, 2010 at 12:54 PM, Grant Maw <[email protected]> wrote:

> Hi All
>
> Am getting a headache trying to implement webforms (as opposed to MVC)
> routing. I want to send all requests for http://mysite/articles/<articlename>
> to a particular route handler. And it works, provided that I append .aspx
> onto the URL (so 
> http://mysite/articles/<articlename>.aspx<http://mysite/articles/%3Carticlename%3E.aspx>instead
>  of
> http://mysite/articles/<articlename>). If I lose the .aspx extension I get
> a 404.
>
> It strikes me that this is an IIS level thing rather than an application
> thing, but I cannot figure out what it is. I'm running IIS 7 on Vista on my
> test box.
>
> The relevant bits of my web.config as follows :
>
> <
>
> system.webServer>
>      <
> validation validateIntegratedModeConfiguration="false"/>
>      <
> modules>
>         <
> remove name="ScriptModule"/>
>
> <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule,
> System.Web.Routing, Version=3.5.0.0, Culture=neutral,
> PublicKeyToken=31BF3856AD364E35" />
>     </
> modules>
>
> <handlers>
>         <add name="UrlRoutingHandler" preCondition="classicMode" verb="*"
> path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
>     </
> handlers>
> </
> system.webServer>
>
> My route is configured as follows :
>
> routes.Add(
>
> "Article By Title", new Route("Articles/{*ArticleName}", new
> ArticleRouteHandler()));
> Anyone who can tell me what I've missed? It feels like I've overlooked the
> obvious.
>
> Cheers
>
> Grant
>

Reply via email to