views:

135

answers:

1

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.

OK

Running the same commands from the commandline works correctly.

Anyone have any idea what is going on?

Thanks, Davy

A: 

You are probably not running it from the correct folder. You have:

c:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe

for ASP.NET 2.0 and:

c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe

for ASP.NET 4.0

Darin Dimitrov
Thanks for reply but it is definitely being run from the v2 folder.
daftspaniel
And your application is targeting which CLR version? Also in IIS the application pool is targeting which CLR version?
Darin Dimitrov
We are targeting 2.0 and the 'App Pool' is set to this. I have added this version detail to the original question.
daftspaniel