.Net 4.0 Framework Causing Issue for aspnet_regiis during installation [closed]
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exc开发者_StackOverflowhange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this questionWe 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
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
This issue was caused by aspnet_regiis.exe not dealing with short (8.3) filenames in this scenario. The fix was simply to always supply the full version of the path.
Davy
精彩评论