调用Word功能时出现“ Access is denied""错误,但是原来是运行正常的,突然出现这个错误,我已经设置过Dcomcnfg中的权限,还会有其它什么原因造成?

解决方案 »

  1.   

    Try this. Start...Run...DCOMCNFG.EXE (Since you're launching Word, which is
    a COM component, .NET Interop uses DCOM).In DCOMCNFG, find the application named 'Microsoft Word document'. (If you
    have Windows XP, I think you will find it in Console
    Root...Component Services...Computers...My Computer...DCOM Config.
    Otherwise, look on the "Application" tab.)On the properties window for 'Microsoft Word document', select the Security
    tab and add the ASPNET user to the Launch and Access permissions list.If you are not familiar with DCOMCNFG, please read the following article.Q268550 HOWTO: Use DCOMCNFG for a VB DCOM Client/Server Application,
    http://support.microsoft.com/support/kb/articles/q268/5/50.asp
      

  2.   

    Notes:You must add user ASPNET to both Launch Permissions and Access Permissions
      

  3.   

    说漏了一点,asp.net中调用的时一个自己写的com,而com才调用的是Word对象,Access is denied会不会是调用COM出的错?