JDEE8297
asked on
mapping .htm or .html to run as .asp files in iis .75
I am trying to get a site that has .htm extensions but executes asp code with in the pages, as it was set up to execute .htm as .asp files witin IIS. This was originally running on a Windows 2003 server, but I have moved it to Windows2008.
So any help you can give on this would be appreciated. Thanks.
So any help you can give on this would be appreciated. Thanks.
In the properties for the site, on the Home Directory tab, click the Configuration... button. On the Mappings tab, Add a mapping for .htm that points to the same handler .asp files are configured to use.
ASKER
not sure if what you called out was for IIS 6 or IIS 7.5, it has been a while since I was in IIS 6.0 admin. I am working with IIS 7.5, and the closest thing to the Home Directory tab that you called out is Handler Mappings, and I added in setting for it and no luck.
Right idea, but perhaps the wrong implementation. Try the process here:
http://www.amixa.com/blog/2011/03/31/iis-7-and-iis-7-5-script-map-htm-to-asp-dll/
http://www.amixa.com/blog/2011/03/31/iis-7-and-iis-7-5-script-map-htm-to-asp-dll/
ASKER
tried that one as well, either I am not doing it right or that was for a different problem from mine. Although, it does look the same, but when I tried it.....it kind of broke other stuff and didn't actually work for my problem.
Are your restarting IIS/AppPools after making the change? Admittedly, this isn't something I've done, but I've heard of people successfully doing it.
ASKER
I will give it a try later on, but I did do a IISreset on the server when I tried my changes....I will have better luck with it later on today, as it is adevelopment server and people are using it internally. Later on tonight, it will just be me on it.
ASKER
okay.......here is where I am thinking I am not doing this right, if my site name in IIS is site1.dev.com and the domain for the site1 is site1.dev.com, and I want the htm to map to asp for only this site. What does one put in for location path, every example says Default Web Site, which is the default name which I can see in IIS. I do I put in site1.dev.com or something else?
ASKER
this is what my config looks like
<location path="site.devnet.tdomain. com">
<system.webServer>
<asp appAllowClientDebug="true" scriptErrorSentToBrowser=" true" />
<handlers>
<add name="htm" path="*.htm" verb="*" modules="IsapiModule" scriptProcessor="%windir%\ system32\i netsrv\asp .dll" resourceType="File" />
</handlers>
</system.webServer>
</location>
<location path="site.devnet.tdomain.
<system.webServer>
<asp appAllowClientDebug="true"
<handlers>
<add name="htm" path="*.htm" verb="*" modules="IsapiModule" scriptProcessor="%windir%\
</handlers>
</system.webServer>
</location>
ASKER
and in the web.config, I can see the following:
<httpHandlers>
<add verb="GET, HEAD, POST, DEBUG" path="*.htm" type="System.Web.UI.PageHa ndlerFacto ry"/>
<add verb="GET, HEAD, POST, DEBUG" path="*.html" type="System.Web.UI.PageHa ndlerFacto ry"/>
<add verb="GET, HEAD, POST, DEBUG" path="*.asp" type="System.Web.UI.PageHa ndlerFacto ry"/>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Se rvices.Scr iptHandler Factory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Se rvices.Scr iptHandler Factory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers. ScriptReso urceHandle r, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35" validate="false"/>
</httpHandlers>
really confused as to why it is not working for me.....starting to tick me off
<httpHandlers>
<add verb="GET, HEAD, POST, DEBUG" path="*.htm" type="System.Web.UI.PageHa
<add verb="GET, HEAD, POST, DEBUG" path="*.html" type="System.Web.UI.PageHa
<add verb="GET, HEAD, POST, DEBUG" path="*.asp" type="System.Web.UI.PageHa
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Se
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Se
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.
</httpHandlers>
really confused as to why it is not working for me.....starting to tick me off
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
this resolved my problem.