irm and word automation

R

raan0101

Hi,
I can open, edit,save the file,but I can not apply IRM to Word in
asp.net.

my code likes this:


Doc = WordApplication.Documents.Open(); // open
WordApplication.Selection.TypeText("edit it");// edit it
// Doc.Permission.Add(userid, permission, expireddate) // apply IRM
Doc.Save(); // save
WordApplication.Application.quit();// quit


if i uncomments the Permission.Add code, it will throws exception
message


Word cannot save or create this file. Make sure that the disk you want
to
save the file on is not full, write-protected, or damaged.
(C:\test\test.doc)


The code works fine in Windows App,but fails in asp.net.


I have full-control access to the doc, as I have do the configuration
according to http://support.microsoft.com/kb/288366/
And my web application runs under the admin account.


Can anyone give me some clues? Thanks!

Raan
 
V

vapor

This is most likely a permissions issue because the worker process may not
have the sufficient permissions to perform the operation. Any particular
reason for automating word on the server?

--
--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top