Everything worked on IIS 6, that is having all html pages displayed at if they were ASP.net. Now I moved to IIS 7 and I can't get this to work any longer. I've tried using IIS Manger and created a Handler - no luck. I've tried for about 4 hours with different config values all with no luck. Does anyone know how to do this in IIS 7? This is what I added to get this to work in IIS 6: <compilation defaultLanguage="c#" debug="false"> <add extension=".html" type="System.Web.Compilation.PageBuildProvider"/> </buildProviders> </compilation> and <httpHandlers> <add verb="*" path="*.html" type="System.Web.UI.PageHandlerFactory" /> </httpHandlers> Thanks.
I tried that and now I get a 500.21 error saying: Handler "htm-aspnet" has a bad module "ManagedPipelineHandler" in its module list Link: http://www.biztalkgurus.com/test.html I added <add verb="*" name="htm-aspnet" path="*.html" type="System.Web.UI.PageHandlerFactory" /> to the handlers of the system.webserver section.
You should be able to use the IIS manager to create such a mapping. - Clear your web.config just so you don't have any conflict. - Logon using IIS 7 manager - Goto Handler Mappings - Click Add Script Map on the right sidebar - In the add scriptmap dialogue box Request path:*.html Executable:%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll Name: what ever you want Bruce DiscountASP.NET www.DiscountASP.NET
That?s exactly what I?ve been doing with no success. </o> When the Application Pool Pipelineset is set to Classic ? I get an Unhandled Excletion. When it?s set to integrated, my HTML page displays with the script doesn?t run (i.e. just plan HTML and not ASP.net).</o> I?m running Community Server 2008 so I have a lot of other setting in the App.config but nothing related to html files. </o> Any other suggestions?</o> It?s not a big deal I guess. All my HTML pages that have scripts are just redirects and only get a few hits a day. Just trying to figure out why it?s not working.</o>
Stephen W. Thomas said... Everything worked on IIS 6, that is having all html pages displayed at if they were ASP.net. Now I moved to IIS 7 and I can't get this to work any longer. I've tried using IIS Manger and created a Handler - no luck. I've tried for about 4 hours with different config values all with no luck. Does anyone know how to do this in IIS 7? This is what I added to get this to work in IIS 6: <compilation defaultLanguage="c#" debug="false"> <add extension=".html" type="System.Web.Compilation.PageBuildProvider"/> </buildProviders> </compilation> and <httpHandlers> <add verb="*" path="*.html" type="System.Web.UI.PageHandlerFactory" /> </httpHandlers> Thanks. If you stay in integrated mode, here's what you do... httpHandlers would have to be converted to handlers in system.webServer. <configuration> <system.web> <compilation> <add extension=".html" type="System.Web.Compilation.PageBuildProvider"/> </buildProviders> </compilation> </system.web> <system.webServer> <handlers> <add name="HTML-Integrated" path="*.html" verb="*" type="System.Web.UI.PageHandlerFactory" /> </handlers> </system.webServer> </configuration> [/quote] Aristotle DiscountASP.NET www.DiscountASP.NET
In your IIS7 settings, your Control Panel, you can switch to Classic mode. Have you tried? Might be worth experimenting anyway. Salute, Mark
Hi Stephen, Honestly if I wasn't coming apart at the seams working on my house I'd did into this for ya. What I think would be a good step however is to post in the IIS7 forums. The team there is very helpful and is really looking for things like this right now. http://forums.iis.net/default.aspx?GroupID=41 Worth a shot anyway. Salute, Mark i.e. http://forums.iis.net/t/1148607.aspx(Integrated mode handler) Post Edited (wisemx) : 5/13/2008 12:40:04 PM GMT