|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Access denied with interopan "Access denied" error message: private void Form1_Load(object sender, System.EventArgs e) { crash >>> Word.Application app = new Word.ApplicationClass(); } Even though: 1. I run as a user that is a member of administrators group. 2. It has worked before, and still works maybe 1 time out of 10. (timing problem???) 3. It works on another computer. I run Windows XP SP2, .Net framework 1.1. Word is Word XP. However it also crasches if I do Illustrator.Application app = new Illustrator.ApplicationClass(); so it seems to be more of a Interop problem than a word problem. MOREOVER: It works by running equivalent code as a vb script!!! How the #¤!% can that be????? I've tried FileMon and RegMon with no leading result. Please if anyone could give a clue I would be very grateful. Best regards Johan if you are using web application try <identity imporsonate="true"/> in
web.config file. The other option is to go to 1. run 2. open dconcnfg 3. browse to dcom folder under dcom located Microsoft Word Application 4. go to properties and under security tab add the ASPNET account to the list. Show quoteHide quote "a95jo***@hotmail.com" wrote: > The following code running in a C# windows forms application gives me > an "Access denied" error message: > > private void Form1_Load(object sender, System.EventArgs e) > { > crash >>> Word.Application app = new Word.ApplicationClass(); > > } > > > Even though: > 1. I run as a user that is a member of administrators group. > 2. It has worked before, and still works maybe 1 time out of 10. > (timing problem???) > 3. It works on another computer. > > I run Windows XP SP2, .Net framework 1.1. > Word is Word XP. However it also crasches if I do > Illustrator.Application app = new Illustrator.ApplicationClass(); so > it seems to be more of a Interop problem than a word problem. > MOREOVER: It works by running equivalent code as a vb script!!! How > the #¤!% can that be????? I've tried FileMon and RegMon with no > leading result. > > Please if anyone could give a clue I would be very grateful. > > Best regards > Johan > Thanks, but this is a windows application, so ASPNET user is AFAIK not
involved. Since I'm running this as an user that is member of Administrators group, I can't understand how this can be. As told, it works when I run a vb-script doing the same thing. Seems a ..net bug to me. / Johan Harry wrote: Show quoteHide quote > if you are using web application try <identity imporsonate="true"/> in > web.config file. The other option is to go to > 1. run > 2. open dconcnfg > 3. browse to dcom folder under dcom located Microsoft Word Application > 4. go to properties and under security tab add the ASPNET account to the list. > > "a95jo***@hotmail.com" wrote: > > > The following code running in a C# windows forms application gives me > > an "Access denied" error message: > > > > private void Form1_Load(object sender, System.EventArgs e) > > { > > crash >>> Word.Application app = new Word.ApplicationClass(); > > > > } > > > > > > Even though: > > 1. I run as a user that is a member of administrators group. > > 2. It has worked before, and still works maybe 1 time out of 10. > > (timing problem???) > > 3. It works on another computer. > > > > I run Windows XP SP2, .Net framework 1.1. > > Word is Word XP. However it also crasches if I do > > Illustrator.Application app = new Illustrator.ApplicationClass(); so > > it seems to be more of a Interop problem than a word problem. > > MOREOVER: It works by running equivalent code as a vb script!!! How > > the #¤!% can that be????? I've tried FileMon and RegMon with no > > leading result. > > > > Please if anyone could give a clue I would be very grateful. > > > > Best regards > > Johan > > I still have the problem, it seems to come down to that the problem
came when the computer was moved from a workgroup to a domain. The user switched from workgroup to domain user with the same user name (however with different user profile). I've tried to change name of the old user and disable it but nothing works. The domain is a Linux Samba trying to behave like a NT4 Domain. I haven't found any file permission error (that should have been visible in FileMon, right?) Maybe a reinstallation of windows is the only solution.... Yawn. I found out it's a problem with Oracle Client, moved this issue to
comp.databases.oracle.misc.
Encrypt with RijndaelManaged and decrypt with OpenSSL
IsAuthenticated property on IIdentity interface UIPermission Clipboard Logon user from service running dll from a network share Event Log Write access under ASP.NET Windows Authentication Newbie Question Windows security context Emulating the [PrincipalPermissionAttribute ...] attribute AzMan - ADAM store. |
|||||||||||||||||||||||