.Net Framework 4.0 preventing v2.0 aspnet_regiis from Running RRS feed

  • Question

  • Hi Folks,

    We have a ASP.net 2.0 web app with an installer which appears to hit an issue with .Net Framework 4.0. This has occurred on XP and Windows 7. Seems to happen every time.

    During the installation, we call aspnet_regiis for various tasks such as encrypting the web.config. If .Net 4 is installed this throws the error:

    aspnet_regiis.exe - .NET Framework Initialization Error
    Unable to find a version of the runtime to run this application.

    Running the same commands from the commandline works correctly. 

    Anyone have any idea what is going on?

    • Edited by Daftspaniel Friday, September 3, 2010 8:56 AM Added asp.net version of our app.
    Friday, September 3, 2010 7:50 AM


  • Hi Davy,

    That should be the installer use the wrong version of aspnet_regiis.exe.

    ASP.NET 2.0 should use the one at .NET Framework v2.0 directory instead of the one with .NET v4.0.

    To be specific, the path should be %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe.


    Figo Fei
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com 

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by Figo Fei Friday, September 10, 2010 8:09 AM
    Monday, September 6, 2010 7:47 AM