Re: Word Automation - System.UnauthorizedAccessException on Winforms

From: Chuck Hartman (ChuckHartman_at_online.nospam)
Date: 01/12/05


Date: Wed, 12 Jan 2005 14:04:45 -0800

Laks,

You need to check out "How to: Grant Permissions to Folders and Assemblies"
at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrtskgrantingpermissionstofoldersassemblies.asp
Using the .NET Framework 1.1 Configuration Tool

This was done automatically for you by the wizard when you created your
project, therefore you cannot "copy deploy" your solution.. You need to
perform manual steps to grant the proper security permissions or create an
installer project that is run by a user with Administrator privileges to
create the needed CAS permissions programmatically.

Chuck Hartman

"Laks Srini" <slnarasimhan@gmail.com> wrote in message
news:2b0141ca.0501100401.1c5446dc@posting.google.com...
> Hi,
>
> I have written a word automation application in c#, using the 2003
> word
> object model 11.0. I have tested it on my system and it works fine.
> When i copy the EXE and required dll's on to another system, I get a
> System.UnauthorizedAccessException.
>
> Considering that all I have written is a windows form, that attempts
> to create a word object and open a document, this is pretty unexpected
> (atleast to me). This exception occurs on creating the word
> application object itself.
>
> But when I add the user to the DCOMCNFG Default Access, then I am able
> to create the word object. But on my own system the code works fine
> without the settings. Can anyone help me out here!!
>
> Thanks and Regards,
> Laks



Relevant Pages

  • Re: CreateFile() returns ERROR_ACCESS_DENIED to the user
    ... grant permissions for power users on the device driver and then do a ... relogon with power user or there is some other place where the ... permissions can be granted? ... users cannot grant permissions to themselves, ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Security options for 2005 Native XML Web Services (ENDPOINT)
    ... You can use groups to grant permissions for the endpoint. ... Jasper Smith (SQL Server MVP) ...
    (microsoft.public.sqlserver.security)
  • RE: A-G-DL-P strategy
    ... But in my case, I can't grant permissions to a DLG group, because on the ... The only groups I can grant permissions are DG groups. ... > DLGs can contain members from any domain but can only be used to permission ...
    (microsoft.public.windows.server.active_directory)
  • Re: Granting file access permissions
    ... > have those permissions flow down to all child OUs? ... >> You can grant permissions based on OUs. ... >> Microsoft MVP - Windows Security ...
    (microsoft.public.windows.server.general)
  • Re: System.UnauthorizedAccessException: Access is denied. - Excel Application.
    ... There are a lot of gotchas using automation on asp.net. ... permissions. ... Click yes to all the dialogs and then locate Microsoft ...
    (microsoft.public.dotnet.framework.aspnet)