解决System.Runtime.Interopservices.COMException问题

     以前用的是Windows XP的操作系统,创建了一个ASP.NET项目,运行的好好的。这段时间换了Windows Server 2008操作系统,再用VS打开该项目时,发现项目无法打开,并出现了以下错误提示:System.Runtime.Interopservices.COMException

     查阅一些资料后,发现是由于IIS服务器的问题造成的,Windows XP系统是IIS6.0,而Windows Server 2008用的是IIS7.0,而项目不能兼容这两种IIS,当时,计算机没有安装IIS6配置兼容性组件(IIS 6 metabase and IIS 6 Configuration Compatiblity ASP.NET) ,所以不能打开项目。

     目前有两种解决方法:

     方法1:用记事本打开Web项目的的项目文件,将如下配置节点<UseIIS>True</UseIIS> 修改为<UseIIS>False</UseIIS> ,这样就可以让VS 内置WebServer来打开项目,而不是IIS打开项目。这种情况下,IIS不会自动为项目创建虚拟目录。

    方法2:在Windows Server 2008操作系统的“服务器管理器”中安装【IIS6配置兼容性组件(IIS 6 metabase and IIS 6 Configuration Compatiblity ASP.NET)】。

  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
Retrieving the COM class factory for component with CLSID {0002E55D-0000-0000-C000-000000000046} failed due to the following error: 80040154. 收藏 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {0002E55D-0000-0000-C000-000000000046} failed due to the following error: 80040154. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [COMException (0x80040154): Retrieving the COM class factory for component with CLSID {0002E55D-0000-0000-C000-000000000046} failed due to the following error: 80040154.] GraphPage.Page_Load(Object sender, EventArgs e) +1097 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082 请大家帮忙 谢谢 Server Error in '/' Application. -------------------------------------------------------------------------------- Retrieving the COM class factory for component with CLSID {0002E55D-0000-0000-C000-000000000046} failed due to the following error: 80040154.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值