PC Review


Reply
Thread Tools Rate Thread

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

 
 
royan
Guest
Posts: n/a
 
      27th Mar 2007
Help please! I have the same problem which this post

http://groups.google.com/group/micro...4638c6d6ba3872

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,

 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      27th Mar 2007
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 ?




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"royan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Help please! I have the same problem which this post
>
> http://groups.google.com/group/micro...4638c6d6ba3872
>
> 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,
>



 
Reply With Quote
 
royan
Guest
Posts: n/a
 
      2nd Apr 2007
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

 
Reply With Quote
 
royan
Guest
Posts: n/a
 
      2nd Apr 2007
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.

 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      2nd Apr 2007
"royan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

>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...US;q257757#kb2

This will solve all your problems:
http://www.aspose.com/Products/Aspos...s/Default.aspx


 
Reply With Quote
 
royan
Guest
Posts: n/a
 
      2nd Apr 2007
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


 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      2nd Apr 2007
"royan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> We don't have problem with Win2000.


In which case, you're very, very lucky...
http://support.microsoft.com/default...US;q257757#kb2

> I need a quick simple solution for Win2003.


http://www.aspose.com/Products/Aspos...s/Default.aspx


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access is denied - Win2003, IIS6, VB.NET, WORD COM object royan Microsoft ASP .NET 1 7th Feb 2008 07:06 PM
Win2003 Server: Access Denied =?Utf-8?B?UmlDTw==?= Windows Vista Networking 4 10th Feb 2007 05:55 AM
Win2003 Server - Access to the path is denied Jody Gelowitz Microsoft ASP .NET 1 17th Aug 2005 03:48 PM
Access denied on remote registry access, from Win2003 sp1 Jan F. Jacobsen Microsoft Windows 2000 Registry 3 14th Aug 2005 08:29 PM
Could Not Access CDO.Message object in IIS6.0 Desmond Microsoft ASP .NET 2 11th Jul 2003 07:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:54 PM.