all groups > dotnet web services > october 2007 >
You're in the

dotnet web services

group:

irm and web services



irm and web services Raan
10/14/2007 10:44:27 PM
dotnet web services: Hi,
I can open, edit,save the file,but I can not apply IRM to Word in
asp.net webservice.

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
Re: irm and web services John Saunders [MVP]
10/17/2007 12:20:35 PM
[quoted text, click to view]

Office is not supported for use inside a web service. The Office Automation
APIs were created for use in a desktop environment.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

AddThis Social Bookmark Button