Solved

Applying RMS on Word document by using .net web service

Posted on 2012-03-27
3
817 Views
Last Modified: 2012-04-27
Problem Description:
==================

If I run web service directly after running it from visual studio: the calling of web service applying correctly and RMS policy can be applied on document.

                BUT, After publish web service on IIS and calling it, the RMS policy couldn’t be applied on word document and it causing crash in MS word.
                Other Word automation functions work correctly, only “ApplyPolicy” not working

                I’ve changed security in:
-       “DefaultAppPool” in IIS
-      DCOM objects
-      Create folder “Desktop” under Windows\sysWOW64\config\systemProfile”

Problem only if we applying RMS via web service, if we open normal word documents and try to protect, RMS working fine.

Additional Information:
=====================

RMS server: 2008

RMS client operation system:

-      Windows server 2008 R2
-      Office 2007
-      IIS 7.0
-      .Net framework 2.0

Web Service simple code for web method:
=====================================
 //OBJECT OF MISSING "NULL VALUE"
        Object oMissing = System.Reflection.Missing.Value;

        //OBJECTS OF FALSE AND TRUE
        Object oTrue = true;
        Object oFalse = false;

        Microsoft.Office.Interop.Word.Application oWord;
        Microsoft.Office.Interop.Word.Document oWordDoc;

       oWord = new Microsoft.Office.Interop.Word.Application();
       oWordDoc = new Microsoft.Office.Interop.Word.Document();
            
            //MAKING THE APPLICATION VISIBLE
            oWord.Visible = false;

           //ADDING A NEW DOCUMENT TO THE APPLICATION
oWordDoc = oWord.Documents.Add(ref filePath, ref oMissing, ref oMissing, ref oMissing);
oWordDoc.Permission.ApplyPolicy(“template.xml”);

oWordDoc.SaveAs(ref filePath, ref oMissing, ref oMissing, ref oMissing,
            ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
            ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
            ref oMissing, ref oMissing);

            //CLOSING THE FILE
oWordDoc.Close(ref oFalse, ref oMissing, ref oMissing);

           //QUITTING THE APPLICATION
oWord.Quit(ref oMissing, ref oMissing, ref oMissing);

Open in new window

0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 37775818
which error do u get?
0
 
LVL 14

Accepted Solution

by:
Abduljalil Abou Alzahab earned 0 total points
ID: 37877448
The problem solved after exclude RMS and portal site URL's from proxy settings
0
 
LVL 14

Author Closing Comment

by:Abduljalil Abou Alzahab
ID: 37901134
I solve the issue by excluding specific URL's from IE proxy settings
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Anything wrong with Window server backup? 8 92
Multiple Errors from DCDIAG 2 21
Adjust the codes 3 37
EXCHANGE 2010, EXCHANGE 2013 4 24
Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
Always backup Domain, SYSVOL etc.using processes according to Microsoft Best Practices. This is meant as a disaster recovery process for small environments that did not implement backup processes and did not run a secondary domain controller that ne…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question