Groups | Blog | Home
all groups > asp.net security > september 2003 >

asp.net security : .NET and Office XP but Access Denied



Philip Lee
9/1/2003 7:38:11 PM
Dear all,

Platform: Windows 2000 server
ASP.NET (using VB.NET 2003)
Office XP

When I reference to Word 10.0 Object Library (C:\Program
Files\Microsoft Office\Office 10\MSWORD.OLB), then I just
wirte:

Dim WordApp as New Word.Application
And I got error "System.UnauthorizedAccessException:
Access is Denied"
When I change <identity impersonate="false"> to <identity
impersonate="true" username="administrator" password="">
in web.config, problem solves, but I don't want to change
this config because I don't know administrator password in
production server. Any method to use object library but
need not change settings?

Thanks in advanced

Philip
Tom Vande Stouwe MCSD.net
9/3/2003 11:18:34 AM
Philip,

The ASPNET user does not have permission to use the Word. You will need to:
1) Allow ASPNET to launch word
2) Create a user on the box with permission to open word and impersonate hat
user (Recommended)

Other solutions will follow I'm sure ;)

Tom
--
==========================================
= Tom Vande Stouwe MCSD.net, MCAD.net, MCP
= 45Wallstreet.com (www.45wallstreet.com)
= (803)-345-5001
==========================================
= If you are not making any mistakes
..= ..you are not trying hard enough.
==========================================
This is the spam catching address: gotcha@conpro.net do not use this address
or you will be blocked at the server ;)

[quoted text, click to view]

Philip Lee
9/3/2003 9:20:43 PM
Thank you very much.

But I would like to ask what permission should I grant?
ASPNET user belonged to USERS group already and other
USERS group user can launch word. I just give ASPNET file
permission at Office folder or modify some settings in
local security policy? I don't want to grant administrator
rights.

Thanks again

Philip

[quoted text, click to view]
AddThis Social Bookmark Button