开发者

.Net 4.0 Framework Causing Issue for aspnet_regiis during installation [closed]

开发者 https://www.devze.com 2023-01-14 02:11 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

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 question

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号