Hi all,
I'm having troubles with generating Word documents from a predefined Word template. Since I have found on the Net it's not recommended for Word docs to be generated from within ASP.NET app, I have created a small console application which will do the work.
The thing is, when I start this console app manually, it works fine, but when ASP.NET app tries to call it, it returns an UnauthorizedAccessException.
Here is the calling code
Code:
Process objGenDoc = new Process();
objGenDoc.StartInfo.FileName = Server.MapPath("~/GenerateDocument.exe");
objGenDoc.Start();
objGenDoc.WaitForExit(8000);
I'ld also like to mention I have no such thing as "Microsoft Word Application" or something similar which would point to Word application in my Component Service (dcomcnfg) from which I could set launching or accessing permissions.
I'm running 64bit Vista, Office 2007 and IIS7.
Word and Office references have been added to web.config file.
Thanks in advance.
Aleksandar Dragosavac
Belgrade, Serbia