![]() Application. ![]() ![]() ![]() ![]() the COM class factory for component with CLSID ![]() to the following error: 8000401a. ![]() 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. ![]() ![]() ![]() Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID ![]() to the following error: 8000401a. ![]() ![]() Error: ![]() ![]() ![]() 175: ![]() 176: //创建一个名为WordApp的组件对象 ![]() Word.ApplicationClass(); ![]() 178: //创建一个名为WordDoc的文档对象 ![]() WordApp.Documents.Add(ref Nothing, ref Nothing, ref Nothing, ref Nothing); ![]() ![]() ![]() ![]() Trace: ![]() ![]() ![]() ![]() (0x8000401a): Retrieving the COM class factory for component with CLSID ![]() to the following error: 8000401a.] ![]() SafetyTrainingManagement_TrainingManagement_CertificationTraining_TrainingTaskReleaseAdd.btnSubmit_Click(Object sender, EventArgs e) in d:\AffairProject\SafetyTrainingManagement\TrainingManagement\CertificationTraining\TrainingTaskReleaseAdd.aspx.cs:177 ![]() System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 ![]() System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107 ![]() System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 ![]() System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 ![]() System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 ![]() System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102 ![]() ![]() ![]() ![]() ![]() ![]() Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832 这个问题困扰了我很久,在网上找了很多资料都没用, 最后找到解决方案: 运行dcomcnfg打开组件服务, 依次展开"组件服务"->"计算机"->"我的电脑"->"DCOM配置" 找到"Microsoft Excel应用程序"或"Microsoft Word应用程序", 右键打开属性对话框,点击"标识"选项卡, 点"下列用户",把管理员的用户密码正确填写进去...?? 点击"安全"选项卡, 依次把"启动和激活权限","访问权限","配置权限",都选择为自定义, 然后依次点击它们的编辑,把everyone添加进去,并加入所有的权限... OK,解决此问题! 在创建 EXCEL
应用程序时出现错误: 检索 COM 要在交互式用户帐户下设置 Office 自动化服务器,请按照下列步骤操作:
|
|