Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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??? :(

share|improve this question
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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