Pages

Wednesday, November 16, 2011

ASP.NET 4.0 has not been registered on the Web server.


ASP.NET 4.0 has not been registered on the Web server.
You need to manually configure your Web server for ASP.NET 4.0 in order for your site to run correctly.



If you ever come across this warning message when creating a new Web Application or configuring your Web Site to be hosted directly on IIS instead of Visual Studio's Development Server, simply run the regiis util, inside the correct Framework's version installation folder, with Administrator privileges, like this:




That should solve it.

I'm not sure but I think this happens when you install the .NET Framework before you install IIS. If it happens with other versions of the .NET Framework, you should simply switch its folder to the correct version.



Here's the text:
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
aspnet_regiis -i

4 comments:

  1. Thanks, you seem to be the only one who has a simple, effective answer to this problem...

    ReplyDelete
  2. Thanks, saved my day. Maybe interesting to add, whenever you get the error to have administrative rights, the command line should be run as 'administrator'.

    ReplyDelete
    Replies
    1. Added to the post. Thanks for the feedback.

      Delete
  3. Thank you so much i spent 2 days to solve it but you made it

    ReplyDelete