Last post May 20, 2013 10:32 AM by FccSie
May 20, 2013 05:07 AM|FccSie|LINK
I have a problem in a ASP web application using the Network service as IIS Identity, and using the Micorsoft Powerpoint Interop DLLs.
I have a windows 7 computer acting as server and developing machine.
I need to use this user for accesing LAN resources in the application.
The problem is that when we use the powerpoint interop dlls (We have read that Microsoft does not recommend them for Web applications but at this moment we have to reuse the code we have in other local applications) the method which creates the powerpoint
file seems idle when debugging the application in the call to Slide Shapes.AddPicture method.
If I remove this statement, the interop works well and create the file, but I don't know why is not working.
I configured the DCOM service components as described in this forum:
1. In DCOMCNFG, right click on the My Computer and select properties.
2. Choose the COM Securities tab
3. In Access Permissions, click "Edit Defaults" and add Network Service to it and give it "Allow local access" permission. Do the same for <Machine_name>\Users.
4. In launch and Activation Permissions, click "Edit Defaults" and add Network Service to it and give it "Local launch" and "Local Activation" permission. Do the same for <Machine_name>\Users
Press OK and thats it.
Also, I followed the intructions below:
Summary of the 'Ogawa Hack': create a desktop folder for the system profile, as:
and, if running on a 64-bit machine, create another one, as:
Also, the folder(s) need write permission for whatever user is "driving" Office.
In summary, this should be a permissions problem with the following statement in my code:
Shape shape = slide.Shapes.AddPicture(fileName, MsoTriState.msoFalse, MsoTriState.msoTrue,
I also have full control (read and write permissions for network service user) in the folder used in the filename parameter, but with no sucessful results.
I think this is a permissions issue because if I change the IIS identity to my local user name ( is an administrator account) instead of Network Service, this statement works and the web application does what I need.
Therefore something more need to be configured in order to make a successful call to the AddPicture method using the network service account as IIS identity. It's strange that the interop method slide.Shapes.AddShape is working but AddPicture not.
Any help would be appreciated.
Thanks in advance!!!
May 20, 2013 10:32 AM|FccSie|LINK
Definetively, it is a permissions issue, I changed the network service user to be an administrator in the machine, and all work perfectly, therefore, something is used by the AddPicture method of the Powerpoint Interop libraries which a normal user/or an
administrator user can execute without problems and the network service user does not have the needed permissions somewhere.
Before giving administrator permissions, I tried to add the whole C: unit and all local units to have full control for netwrok service user, without success. Also I tried to give full control to the root folders of the windows registry, but also without
The question is, where and what shall I change?
I read about giving Network Service interact with the Desktop, now I'm working in this way but I don't know how to configure that in windows 7.