Trying to Map *.html files to ASP.dll for parsing on IIS7

Discussion in 'Windows / IIS' started by handiramp, Jun 20, 2008.

  1. Hi I'm trying to map my .html files to the asp.dll engine for parsing (I'd like IIS7 to treat .html files like they were old .asp files and run and <% %> code in them).

    This worked fine on previous IIS servers but I can't get it to work on IIS7 despite copying the ASPClassic script map in the Handler Mappings.

    Under the old IIS server I accomplished this by following these steps:

    1. On the web server, go to the Internet Services Manager. (Usually under Administrative Tools, or you can go to Computer Management) 2. Right click on the website you wish to change, click Properties.
    3. In the properties dialog, under the Home Directory tab, click the Configuration... button.
    4. In the application Configuration dialog, under the App mappings tab, click the Add button.
    5. In the Add/Edit application extension mapping dialog, enter the following
    values:
    * Executable: C:\WINNT\system32\inetsrv\asp.dll
    * extension: .html (need this done for .htm too)
    * Verbs section, select Limit to: GET,HEAD,POST,TRACE
    * Script engine is checked
    * Check that file exists is not checked
    6. Click the OK, OK, OK

    Any help would be greatly appreciated.
     
  2. Joseph Jun

    Joseph Jun DiscountASP.NET Staff

    You should be able to connect to IIS 7 using the Microsoft IIS 7.0 Manager and make the change using the Handler Mappings module.

    If you're running into any errors using either the client application or adding the script mapping, can you include any/all errors you're receiving so we can help you?

    Winston

    DiscountASP.NET
     
  3. Well, there were/are no errors, it just doesn't run the code...
     
  4. Joseph Jun

    Joseph Jun DiscountASP.NET Staff

    Sorry for the delayed reply, it's been pretty hectic. I spent some time this afternoon working on this issue with one of our developers and the problem seems to be the following attribute that gets included, preCondition='bitness64' which you can find in the web.config file.

    If you open up your web.config file, could you change your line in the handlers tag to look something like:

    <add name='HTM-TO-ASP' path='*.htm' verb='*' modules='IsapiModule' scriptProcessor='C:\windows\system32\inetsrv\asp.dll' resourceType='File' requireAccess='Script' />

    We found that the preCondition attribute is usually towards the end of the line.

    Let me know if it resolves the problem because I'm very curious to see if this is what's causing the problem.

    EDIT: You should be able to leave the pipeline mode in integrated.

    Winston

    DiscountASP.NET
     
  5. Winston, thanks for your help. This worked:


     
  6. Hi

    I am also facing the same problem of mapping html to aspnet.
    Tried the same,but not working. Can u please tell me the whole procedure in steps.

    Are you mapping in classic mode or integrated mode?

    Thanks a lot for your help.

    Please reply.

    Thanks
    Amandeep
     
  7. Hi

    I am facing problem on live.
    Extension mapping problem - Html to aspnet dll on iis7.
    Please help.
     
  8. Bruce

    Bruce DiscountASP.NET Staff

Share This Page