问题描述
我们在Windows Server 2008 R2 SP1上运行IIS7,网站在.NET 2.0上运行.该网站可以正常工作,只是全局主题不起作用.我继续尝试在Framework64目录中执行aspnet_regiis -c并得到
We are running IIS7 on Windows Server 2008 R2 SP1, with websites running on .NET 2.0. The websites work fine except that global themes do not work. I went ahead and tried to do aspnet_regiis -c in the Framework64 directory and got
An error has occured: 0x80040154 Class not registered.
The error indicates that IIS is not installed on the machine.
Please install IIS before using this tool.
如果您想知道,enabled32bitApps标志处于关闭状态,因此使用.NET x64.我继续并成功卸载了(aspnet_regiis -u)
并重新安装了(aspnet_regiis -i
)Framework64文件夹中的.net.之后,尝试运行aspnet_regiis -c
时得到相同的结果.
If you are wondering, the enabled32bitApps flag is off, so .NET x64 is used.I went ahead and uninstalled (aspnet_regiis -u)
and reinstalled (aspnet_regiis -i
) .net in Framework64 folder successfully.Afterwards I got same result trying to run aspnet_regiis -c
.
有人知道这里可能是什么问题吗?
Does anyone have any idea what could be the problem here?
推荐答案
我发现了一个简单的解决方法,它不包括运行aspnet_regiis -c
命令.在IIS中的默认站点下,您应该已经具有以下目录结构:
I have found a easy workaround for this which does not include running the aspnet_regiis -c
command. Under your default site in IIS, you should already have following directory structure:
aspnet_clinet --> system_web --> 2_0_50727
所有您需要做的就是将主题复制到文件系统上的...\wwwroot\aspnet_client\system_web\2_0_50727\Themes
中,然后在aspnet_client\system_web\2_0_50727
中创建一个IIS虚拟目录"Themes",该目录映射到您的文件系统Themes目录.
All you have to do is copy your themes into ...\wwwroot\aspnet_client\system_web\2_0_50727\Themes
on your file system and thencreate a IIS virtual directory "Themes" in aspnet_client\system_web\2_0_50727
which maps to your file system Themes directory.
这篇关于IIS7 .NET x64 aspnet_regiis -i导致类未注册错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!