I'm suddenly getting a rather strange IIS error on my server:

There is no build provider registered for the extension '.html'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.

Since when does .html need a build provider??? I haven't touched any build provider or handler mappings. Haven't touched the default web.config or machine.config from the .NET config directory.

How does a web server forget how to serve HTML??? :(

link|improve this question

75% accept rate
feedback

1 Answer

Add this to your web.config:

<buildProviders>
    <add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>

You get this error when you try to return the html page from a route handler (or elsewhere) with BuildManager. At least it was like this in my case.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.