Re: Word Automation - System.UnauthorizedAccessException on Winforms
From: Chuck Hartman (ChuckHartman_at_online.nospam)
Date: 01/12/05
- Next message: Linny: "Accessing MS equation editor symbols programatically"
- Previous message: Jon Robertson: "Problem with Word and Document FormFields"
- In reply to: Laks Srini: "Word Automation - System.UnauthorizedAccessException on Winforms"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Linny: "Accessing MS equation editor symbols programatically"
- Previous message: Jon Robertson: "Problem with Word and Document FormFields"
- In reply to: Laks Srini: "Word Automation - System.UnauthorizedAccessException on Winforms"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|