Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / August 2004

Tip: Looking for answers? Try searching our database.

Web Service Access Denied with MS Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Selden McCabe - 03 Aug 2004 16:33 GMT
I have a web service that uses MS Word to do mail merge and printing.  It
works fine when running on my development machine.
But when I deploy it to the server, it fails with "Access Denied" when it
tries to launch Word.
I've used DCOMCNFG to set the user for "MS Word Document" to a local account
which is admin on that box, but that didn't work.  I've also tried making
ASPNET a member of admins on the box.  Still didn't work.
I've also tried using either a local admin account and also my domain
account as the user the web service runds under.
I've also tried setting the Credentials of the web service to
System.Net.CredentialCache.DefaultCredentials before calling the method that
uses Word.
None of these worked.

Before I set the DCOMCNFG settings, I was getting a DCOM launch failure in
the event log on the server, but that's gone now, and there are no events in
the event log when this failure happens.

Any ides, theories, suggestions?

Thanks,  ---Selden McCabe
Trebek - 03 Aug 2004 18:06 GMT
Yeah, this can be a load of fun.  I use MS Word for various spell-checking
options, doc creation, etc...

I have a series of steps I use whenever I attempt to launch Word from ws.
They are detailed below (NOTE:  you've done a few, just check towards the
end to see if this fixes your issue -- look at the .regfile -- bear in mind
that this was written for Win2K servers, the options are slightly different
for 2003/XP but you can figure it out):

HTH,

Alex

1)  The local SAM administrator must create/be logged on to the system to
make these changes
2)  Create an 'OfficeAutoAcct' on the local SAM and assign this acct to the
'Administrators' group
3)  Open MSWord one time and then immediately close it (initializes it to
load registry hive)
4)  Open a cmd prompt and run 'dcomcnfg'
5)  Select MSWord from the list of applications in the list box and choose
'Properties'
6)  Select the 'security' tab and verify that the 'Use Default Access'
permissions for both
 'edit' and 'launch' and selected
7)  Choose the 'identity' tab and select 'This User'
8)  Put the info from the 'OfficeAutoAcct' in the boxes
9)  Push 'OK' and return the main screen
10) Select 'Default Security' tab
11) Make sure the following users are in the ACLs for both 'Default Access'
and 'Default Launch'
 - if not, add them

  *Admininstrators
  *Everyone
  *INTERACTIVE
  *IUSER_
  *IWAM_
  *OfficeAutoUser
  *SYSTEM

*** NOTE: If the system is WinXP, you might need to run the following .Reg
file to make sure the appropriate
          reg entries exist.

   BEGIN .REG FILE

  (Start copying here)

  REGEDIT4

  [HKEY_CLASSES_ROOT\AppID\WINWORD.EXE]
  "AppID"="{00020906-0000-0000-C000-000000000046}"

  [HKEY_CLASSES_ROOT\AppID\EXCEL.EXE]
  "AppID"="{00020812-0000-0000-C000-000000000046}"

  [HKEY_CLASSES_ROOT\AppID\MSACCESS.EXE]
  "AppID"="{73A4C9C1-D68D-11D0-98BF-00A0C90DC8D9}"

  (End Copying here)

   END REG FILE - SAVE WITH .reg extension

12) Restart the system - REQUIRED

> I have a web service that uses MS Word to do mail merge and printing.  It
> works fine when running on my development machine.
[quoted text clipped - 17 lines]
>
> Thanks,  ---Selden McCabe

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.