Wednesday, August 1, 2012

How to solve “Error: Unrecognized element 'folderLevelBuildProviders'”


This morning, I created a ASP.NET using the default application and not touching any of the default code, I tested it successfully with the built-in web server Visual Studio 2010.  Next, I happily clicked on the “Publish Web Site” menu item and deployed it on the local IIS.
Since I did not even do anything to the default code, I thought there would be no problem when I try to call this web application from another computer.  To my dismay,  when I tried to view the site I see an "500 - Internal server error."
So I checked out the IIS manager and tried to click on the “.NET Compilation” icon.  And encountered this error  "Unrecognized element 'folderLevelBuildProviders' ".
Well, “fortunately”, it seems that this is a common problem when and tried to and solved this using the tip from stackoverflow.
So the solution is quite simple, you register the aspnet to recognise the Framework 4.0 like this:
2012-08-01_100301
What you need to make sure is that, depending on whether you are on a 32 bit or 64 bit machine, the command differs abit.
For 32 bit machine
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis –i
For 64 bit machine
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis –i

No comments: