locked
Url Mapping- HTTP Handlers RRS feed

  • Question

  • User496789513 posted

    Hello All,

    I have an indexpage.asp.On the indexpage.asp there are images which have urls that point to folder names.

     for exaple localhost/Chandra.

    This urls are then mapped in web.config files . for example localhost/chandra mapped to /folder/chandra_index.asp page

    I am using a third party dll for HTTP handling.

    When i open the index page and click on the image i am not redirected to the mapped url.

    I am not able to figure out whats going wrong.

    The web.config file in under the root directory and has reference to the httppHandler methods and the mappings are set in the web.config file

    The DLL is registerd in The GAC.

    Please let me know the solution to the problem.

     

     

    Friday, March 2, 2007 10:13 PM

Answers

  • User113421904 posted

    IIS does not route requests file files such as images/css to the aspnet_isapi.dll...so your module is not aware of the request.

    you could either use links for thos resources that dont require rewriting, or you could setup your applications virtual folder in iis to map those extension (gif/jpg/css etc..) to aspnet_isapi.dll.

    http://forums.asp.net/thread/1475666.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 6, 2007 9:14 AM
  • User-225114762 posted

    I think you're missing the point trying to be made concerning the mapping of files from IIS to ASP.NET. It does not matter how much you've mapped things in Web.Config, if the request never gets to ASP.NET.

    There's a common misconception about what http://localhost/foldername refers to. It refers to the file 'foldername' in the application root. Why does this do anything useful in the normal case? Becase IIS will see that you're referring to something without an extension, and then check if there happens to be a directory by that name, and if so redirect your browser to http://localhost/foldername/ . Then, if there's a file that matches the IIS settings for 'default document' in that folder, it'll serve that file.

    To get the request http://localhost/foldername into ASP.NET, you'll have to enable a wild card mapping in IIS, and uncheck the 'check that file exists' option there. This procedure is different in IIS 5 and IIS 6, check the docs. Also, the dialog is buggy in IIS 5 so you'll have to tab and then shift-tab a few times to get the 'OK'-button ungreyed ;-)

     Svante

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 8, 2007 12:50 AM

All replies

  • User621401567 posted

    Could be one of several problems - your best bet is to contact the 3rd Party that you bought it from or refer to there installation instructions.

    Have you reconfigured IIS for your web site to make ASP.Net handle all incoming folder requests?

    Sunday, March 4, 2007 8:39 AM
  • User113421904 posted

    IIS does not route requests file files such as images/css to the aspnet_isapi.dll...so your module is not aware of the request.

    you could either use links for thos resources that dont require rewriting, or you could setup your applications virtual folder in iis to map those extension (gif/jpg/css etc..) to aspnet_isapi.dll.

    http://forums.asp.net/thread/1475666.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 6, 2007 9:14 AM
  • User496789513 posted

    Hi there,

    I think u lost my question.

    On the inde page there are images. When i take my mouse on the image the url i c is of kind localhost/foldername.

    Now this url localhost/foldername is mapped in the web.config file to "www/mysite/mypage_index.asp"

    The dll file is a project created in C# which is same as the ones we find on microsoft sites.

    Its using the IHTTP handler interface.

    I have registerd this class project in GAC and now i have made the required settings in web.config  file .

    But i am not able to make out whats going on.

    The code for the third part is on google the link is

     

    Can you help me out.

    Thanks

     

     

     

     

    Tuesday, March 6, 2007 7:09 PM
  • User-225114762 posted

    I think you're missing the point trying to be made concerning the mapping of files from IIS to ASP.NET. It does not matter how much you've mapped things in Web.Config, if the request never gets to ASP.NET.

    There's a common misconception about what http://localhost/foldername refers to. It refers to the file 'foldername' in the application root. Why does this do anything useful in the normal case? Becase IIS will see that you're referring to something without an extension, and then check if there happens to be a directory by that name, and if so redirect your browser to http://localhost/foldername/ . Then, if there's a file that matches the IIS settings for 'default document' in that folder, it'll serve that file.

    To get the request http://localhost/foldername into ASP.NET, you'll have to enable a wild card mapping in IIS, and uncheck the 'check that file exists' option there. This procedure is different in IIS 5 and IIS 6, check the docs. Also, the dialog is buggy in IIS 5 so you'll have to tab and then shift-tab a few times to get the 'OK'-button ungreyed ;-)

     Svante

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 8, 2007 12:50 AM