问题
I am trying to use my asp.net application to open the outlook. It is working fine on my machine. now i am deploying the app to the server. i got this exception
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
I have been trying to solve this exception for three days. i googled a lot.
What I tried
they said that i have to go to DCOM CONFIG
, i went there but I didn't find the microsoft office outlook entry.
then i opened a cmd and I typed mcc -32
and then i added the component server. after that i saw the outlook entry. i went to the property and then to the security tab, then i change the three of the options there to give access to the everyone user. but i kept having this problem
Note that I did that changes to these two entries
Microsoft Outlook Commadn Button
outlook message attachment
then i changed the user of the application bool to the Administrator
account of the server, but i kept having the problem
please help me, i tried a lot really a lot to solve , but i couldn't
回答1:
I am trying to use my asp.net application to open the outlook.
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.
As a workaround you can use the low-level API - Extended MAPI. Or any other third-party wrappers around that API (for example, Redemption).
来源:https://stackoverflow.com/questions/29536161/retrieving-the-com-class-factory-for-component-with-clsid-error-80070005-access