locked
How to remove a single directory <remove verb... in Web.config RRS feed

  • Question

  • User176292349 posted
    I currently have two HttpHandlers classes in one dll that I use for serving images. The images are in a directory structure such as: /members/_uploaded/ -- Only 1 directory /members/membername/ -- Over 1,000 directories I need to use one HttpHandler Class for the /members/_uploaded/ directory and use the other class for the /members/membername/ directories. I currently have this:
    <add    verb="*" path="/members/*/*.jpg" type="RSWarriorImageHandler.MemberImageHandler,RSWarriorImageHandler" /> 
    <add    verb="*" path="/members/_uploaded/*.jpg" type="RSWarriorImageHandler.ForumImageHandler,RSWarriorImageHandler" /> 	  
    
    However, the images from the _uploaded directory are using both handlers! When I try this I get an error:
    <add    verb="*" path="/members/*/*.jpg" type="RSWarriorImageHandler.MemberImageHandler,RSWarriorImageHandler" /> 
    <remove verb="*" path="/members/_uploaded/*.jpg" />
    <add    verb="*" path="/members/_uploaded/*.jpg" type="RSWarriorImageHandler.ForumImageHandler,RSWarriorImageHandler" /> 	  
    
    Any ideas on how to block the images in the /members/_uploaded/ from using the MemberImageHandler class? Cheers.
    Thursday, August 12, 2004 12:29 PM

All replies

  • User-1372641848 posted
    Have you tried switching add verb sequence like <add verb="*" path="/members/_uploaded/*.jpg" type="RSWarriorImageHandler.ForumImageHandler,RSWarriorImageHandler" /> <add verb="*" path="/members/*/*.jpg" type="RSWarriorImageHandler.MemberImageHandler,RSWarriorImageHandler" /> instead of <add verb="*" path="/members/*/*.jpg" type="RSWarriorImageHandler.MemberImageHandler,RSWarriorImageHandler" /> <add verb="*" path="/members/_uploaded/*.jpg" type="RSWarriorImageHandler.ForumImageHandler,RSWarriorImageHandler" />
    Thursday, August 12, 2004 8:51 PM