Access is denied - Win2003, IIS6, VB.NET, WORD COM object

R

royan

Help please! I have the same problem which this post

http://groups.google.com/group/micr...cess+is+denied.&rnum=1&hl=en#164638c6d6ba3872

When I deploy our ASP.NET Application web form to Windows server 2003
I got access deny error. We are using the
Microsoft.Office.Interop.Word COM DLL. We need to read a template word
document in the server and open word then insert data from user typed

On click of a button the the word application com dll is getting
activated,
but when we do this on a Windows Server 2003 machine we are getting
the
following error.

Exception Details: System.UnauthorizedAccessException: Access is
denied.

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request
identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS
5 or
Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user
(typically
IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in
Explorer,
choose "Properties" and select the Security tab. Click "Add" to add
the
appropriate user or group. Highlight the ASP.NET account, and check
the boxes
for the desired access.

The error in the system event log: Access denied attempting to launch
a DCOM Server. The server is:
{000C101C-0000-0000-C000-000000000046}
The user is NETWORK SERVICE/NT AUTHORITY, SID=S-1-5-20.
I have checked in regedit, this is word application

The defaultAppPool identity (IIS manager) is Network Service.

I have grant access from DCOMCNFG to DCOM Config
The COM DLL Microsoft.Word.Document has been given allow access
permission to these user account:
ASPNET(FULL control), Network service(FULL control), IIS_WPG, IWAM,
SYSTEM, everyone, administrators.

I also grant the same access and permissions to the folder where the
template located and C:\Program Files\Microsoft Office\Office10
(Network service and ASPNET has full control permission.

But I still got the same access deny error. Please help ASAP!!! Thank
you all,
 
J

Juan T. Llibre

re:
The server is: {000C101C-0000-0000-C000-000000000046}

That is the MSI Server ( Windows Installer ).

You are probably being hit by the Office Installer running
when you attempt to run the Word COM dll through Interop.

Do the Office 10 programs you have installed, Word particularly, run OK ?
 
R

royan

I went to event log. Actually the server is Word application. Sorry
for the confusion.

If I added <identity impersonate="true" /> to web.config, I can access
word without error, but normal users still can not access and get this
error:

Here is:

Access denied attempting to launch a DCOM Server. The server is:
{000C101C-0000-0000-C000-000000000046}
The user is NETWORK SERVICE/NT AUTHORITY, SID=S-1-5-20.

Please help!! Thank you for your reply.

Royan
 
R

royan

I went to event log. Actually the server isWord application. Sorry for
the confusion.
Here is the application in system log
{000209FF-0000-0000-C000-000000000046}

I did install Word 10 and it looks OK with me. I don't have any
troubles to open Word or something else.
 
M

Mark Rae

I went to event log. Actually the server is Word application. Sorry
for the confusion.

If I added <identity impersonate="true" /> to web.config, I can access
word without error, but normal users still can not access and get this
error:

Here is:

Access denied attempting to launch a DCOM Server. The server is:
{000C101C-0000-0000-C000-000000000046}
The user is NETWORK SERVICE/NT AUTHORITY, SID=S-1-5-20.

The problem here is that Microsoft Office is simply not designed to work
this way i.e. through server-side automation - the error you're currently
experiencing is merely one of many issues that you're likely to encounter if
you try to do this. Microsoft strongly advises against it to the extent that
they won't actually support any solution which uses it:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2

This will solve all your problems:
http://www.aspose.com/Products/Aspose.Words/Default.aspx
 
R

royan

We don't have problem with Win2000. I need a quick simple solution for
Win2003.

Access denied attempting to launch a DCOM Server. The server is:
{000209FF-0000-0000-C000-000000000046}

If I took off this line off <identity impersonate="true" /> from
web.config, I will get this error:
Access denied attempting to launch a DCOM Server. The server is:
{000C101C-0000-0000-C000-000000000046}
The user is NETWORK SERVICE/NT AUTHORITY, SID=S-1-5-20.

Thank you,
Royan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top