Configuring IIS with new custom type exntensions.....

Last post 06-20-2008 1:56 AM by My Crystal. 2 replies.

Sort Posts:

  • Configuring IIS with new custom type exntensions.....

    06-18-2008, 3:22 AM
    • Loading...
    • andy_dev_in
    • Joined on 03-06-2006, 8:29 AM
    • Posts 3

    Hi,

    I am working on URL rewriting. Everything is working fine with VS 2005 web server. 

    The urls look like the following:

    http://localhost/Prodcuts/Categories/View.Shirts
    http://localhost/Prodcuts/Categories/AddNew.Category

    The URL rewriting configuration is as follows

    1    <RewriterConfig>
    2    <Rules>
    3    <RewriterRule>
    4    <LookFor>~/Prodcuts/Categories/View.Shirts</LookFor>
    5    <SendTo>>~/Pages/Display.aspx?param1=Prodcuts&param2=Categories&mode=View&Type=Shirts</SendTo>
    6    </RewriterRule>
    7    <RewriterRule>
    8    <LookFor>~/Prodcuts/Categories/AddNew.Category</LookFor>
    9    <SendTo>>~/Pages/NewForm.aspx?param1=Prodcuts&param2=Categories&mode=New&Type=Category</SendTo>
    10   </RewriterRule>
    11   </Rules>
    12   </RewriterConfig>


    So extension will change according to the functionality. I could not figure it out how to configure IIS 5.1 to work with these extension. Please help me. Thank you.

    But when I configured application in IIS it is not working.
     Please help me.

    Lakshmi Narasimha Rao M
    Senior ASP.NET Web Developer
  • Re: Configuring IIS with new custom type exntensions.....

    06-18-2008, 6:33 AM
    Answer
    • Loading...
    • BigjimFRG
    • Joined on 06-22-2007, 1:19 PM
    • France
    • Posts 139

    EDIT : nevermind, I think you mean .Shirts or .Category when you talk about extensions, not the parameters -_-;

    here is a link to an article that might be interesting: http://msdn.microsoft.com/en-us/library/ms972953.aspx
    basically, you need to map your custom extensions to the aspnet_isapi.dll and create an httphandler for those.

    there's the example of a ".info" extension at the very end. hope that helps ^_^

  • Re: Configuring IIS with new custom type exntensions.....

    06-20-2008, 1:56 AM
    Answer
    • Loading...
    • My Crystal
    • Joined on 06-08-2008, 10:09 AM
    • Guangzhou, China
    • Posts 252

    hi,andy_dev_in.

    i encounter a similar situation like your's before though i was not using URL rewriting. i wanted the .pdf file to be processing by asp.net rather than by IIS directly, when using VS 2005 web server, i didn't have to add a application mapping in the web server (i also don't know how to set the VS 2005's built-in web server, i can't find a place to set), the pdf file is processed by asp.net successfully. it seeems ( i am not sure) that the built-in web server has a "built-in" application mapping for pdf file.

    but in iis, there is no such built-in application mapping for pdf as welll as .Shirts files and .Category files, so you have to add it yourself. You can add it in IIS, in Home Diectory or virtual Directory\configuration

    What really matters most is the chance to communicate with you, my friends, rather than marking my post as answer, though I would be really appreciated if you do so.
Page 1 of 1 (3 items)
Microsoft Communities
Page view counter