PDA

View Full Version : Trying to Map *.html files to ASP.dll for parsing on IIS7


handiramp
06-20-2008, 04:09 AM
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.

Joseph Jun
06-23-2008, 05:50 AM
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

handiramp
06-23-2008, 07:56 AM
Well, there were/are no errors, it just doesn't run the code...

Joseph Jun
06-23-2008, 09:50 AM
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.d ll' 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

handiramp
06-30-2008, 02:48 AM
Winston, thanks for your help. This worked:


[quote]


<configuration>

<system.webServer>

<handlers>

<addname='ASPClassicforHTM'path='*.htm'verb='*'modu les='IsapiModule'scriptProcessor='C:\windows\syste m32\inetsrv\asp.dll'resourceType='File'requireAcce ss='Script'<s>preCondition='bitness64'/>

<addname='HTM-TO-ASP'path='*.htm'verb='*'modules='IsapiModule'scrip tProcessor='C:\windows\system32\inetsrv\asp.dll're sourceType='File'requireAccess='Script'/>

</handlers>

</system.webServer>

</configuration>
</CODE>

I am not sure how/why we got the preCondition='bitness64' in the first place...

Anyways, it worked. Thanks!

Amandeep
06-30-2009, 06:33 AM
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

Amandeep
06-30-2009, 07:27 AM
Hi

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

bruce
06-30-2009, 09:04 AM
use the IIS Manager to do this.

http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1626