项目在IIS发布运行半年一直很稳定,但最近客户说excel导出崩溃了,远程过去得到标题所示报错。
首先前面那一坨就是excel的注册表标识了,但是关键问题是后面的:0x800703fa错误码:
没有翻墙用万能的google,用百度也是查到国际友人方面提供了msdn里关于重启后有些com+会掉权限,进而会引发上述错误代码的报错。msdn里面描述的解决方案如下:
Resolution
As a workaround it may be necessary to disable this feature which is the default behavior. The policy setting 'Do not forcefully unload the user registry at user logoff' counters the default behavior of Windows 2008. When enabled, Windows 2008 does not forcefully unload the registry and waits until no other processes are using the user registry before it unloads it.
The policy can be found in the group policy editor (gpedit.msc)
Computer Configuration->Administrative Templates->System-> UserProfiles
Do not forcefully unload the user registry at user logoff
Change the setting from “Not Configured” to “Enabled”, which disables the new User Profile Service feature.
'DisableForceUnload' is the value added to the registry
问客户确实是刚刚重启了,于是按照上述对服务器进行相关设置,在客户64位的机器上通过comexp.msc -32访问到excel所在的组件服务管理,保险起见把对应的权限给了network service。
最后重启服务器后,excel得以正常导出。