I have a problem with a C# ASP .NET project in Visual Studio 2008 This problem started when I reinstalled my computer with Windows 7 Ultimate (x64). To this I\'m also using
This one was sticky for me to figure out, maybe my Windows mojo skills are just sub-par. But I could not get Component Services to run in 32 bit mode on Windows Server 2008. Hopefully this can help someone else with the same problem:
EDIT: just for completeness sake, in order to get Word Interop working on Windows Server 2008 I also had to create the Desktop folder as outlined in this answer.
launching dcomcnfg -32
or dcomcnfg /32
both failed to show the target app (Microsoft Excel) in the list.
But my following the directions @ How to make IIS7 play nice with Office Interop, in particular, the note about launching mmc -32
and manually adding in the Component Services snap-in, I was able to get it to appear. (NOTE: although the link talks about IIS7, my issue was with a Windows service).
You should grant an access to Word COM component for ASP.NET process identity ({MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6):
"Control Panel - Administrative Tools - Component Services - Computers - My Computer - DCOM Config"
Find out "Microsoft Word Document", right click - Settings - Security Tab, grant access (local and remote) for ASP.NET process identity ("ASPNET" for IIS 5, "Network Service" for IIS 6).
If then you get an "System.Runtime.InteropServices.COMException (0x800A13E9): There is insufficient memory. Save the document now." exception when open/add document (my own expirience), just delete temporary files from %Temp% and \Content.Word folders.
This error corresponds to .NET System.UnauthorizedAccessException and is usually caused by wrong settings for access on COM component your code tries to create.
You may try to start dcomcnfg utility, go to DCOM settings, select required object and allow access to it for the account your ASP.NET code runs under. It should solve your problem.
Fix to Tomas answer, correct command on Windows Server 2k8 x64 is: "dcomcnfg /32" (slash instead of -)
Also I had to customize all security options by adding IIS_IUSRS with full rights to Lunch and Activation Permissions, Access Permissions and Configuration Permissions. And Interactive user in Identity tab as well. Then it worked for me.
I had this problem with Word 2010 opening doc files and I had to set it for Microsoft Word 97-2003 Document Properties.
I had the same problem, finally was because my user didn't have permission to run the service "Remote Procedure Call(RPC)". In control panel, Administrative tools, I looked for that service and in Log On I clicked in "Local System Account", I restarted the system and problem solved.