locked
How to map path like '/admin/xxx.yyy' in IIS 6? RRS feed

  • Question

  • User-904105500 posted

    Hi there,

    I've added an HttpHandler in my web.config file that looks like this:

    <add verb="*" path="/admin/xxx.yyy" type="..." />

    When I run my application within the VS buil-it web server(Cassini) I can access /admin/xxx.yyy and handle it with the HttpHandler I've implemented. I've put the web app in a virtual directory inside IIS 6 and try to access the same /admin/xxx.yyy path. This time it wasn't handled by my custom HttpHandler. I know I should map the path so aspnet_isapi can handle the request but how can i do this? What i should put in the extension field?

    Tuesday, August 21, 2007 5:06 AM

Answers

  • User-1590039720 posted

    Hi Emil,

    I have tried  a sample like you mentioned, it work fine with IIS 6.0.

    Below is my code:
    <add verb="*" path="admin/samplechart.chart" type="MyHttpHandler.ChartHandler,MyHttpHandler"/>

    please don't add "/admin/samplechart.chart" to config file, it will not find the file.

    I open IE, write http://localhost/WebSite3/admin/samplechart.chart and works fine.

    Hope it helpful to you. 

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 27, 2007 6:52 AM

All replies

  • User1191518856 posted

    You need to make sure the extension is mapped to the ASP.NET engine.

    Check this link: Extending ASP.NET with HttpHandlers and HttpModules

    If you scroll down to "Configuring the HttpHandler in IIS" there are some beautiful screenshots for you :-)

    Tuesday, August 21, 2007 4:02 PM
  • User-904105500 posted

    Thank you, johram.

    I've already read such articles and mapped my extension in IIS (indeed it is .axd so it is handled by the aspnet_isapi.dll by default). But I still can't get my things work...

    Any other suggestions?

    Thursday, August 23, 2007 1:25 AM
  • User-1590039720 posted

    Hi Emil,

    I have tried  a sample like you mentioned, it work fine with IIS 6.0.

    Below is my code:
    <add verb="*" path="admin/samplechart.chart" type="MyHttpHandler.ChartHandler,MyHttpHandler"/>

    please don't add "/admin/samplechart.chart" to config file, it will not find the file.

    I open IE, write http://localhost/WebSite3/admin/samplechart.chart and works fine.

    Hope it helpful to you. 

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 27, 2007 6:52 AM