Friday, November 30, 2012

Powerpoint could not open the file.Com Class component error ---System.UnauthorizedAccessException

One of our developer was getting following error whiel working with Office powerpoint object to integrate different slides in one PPT in SharePoint...

System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80070005........

One should follow these steps to fix it..

DCOM Configuration
1. Click Start -> Run
2. Enter DCOMCNFG and press OK. This will open the DCOMCNFG window.
3. Browse down the tree to Console Root -> Component Services -> Computers -> My Computer
4. right-click on "My Computer" and select properties
5. Select the "Default Properties" tab
a. Enable Distributed COM on this computer - Option is checked
b. Default Authentication Level - Set to Connect
c. Default Impersonation Level - Set to Identify
6. Select the "COM Security" tab
7. Click on Access Permissions ' Edit Default
a. Add "Anonymous", "Everyone", "Interactive", "Network", "System" with Local and Remote access permissions set.
8. Click on Launch and Activation Permissions ' Edit Default
a. Add "Anonymous", "Everyone", "Interactive", "Network", "System" with Local and Remote access permissions set.
9. Click on OK
10. Close the DCOMCNFG window

Error:- Proxy Server not found while running powershell commands

I was getting the above  error while running the powershell commnad on new SP server
                The solution around is that the user must be added to Shell Admin database to run any commands with admin access. Open your powershell command prompt and run the following command:-

Add-SPShellAdmin -UserName "name of the user". Also make sure user has access in Sql server too.. And this should fix the problem...