I have created a very simple ASP.NET page for testing purposes. I am trying
to create a Word.Application object, populate a doent with some text and
then save the doent. I am getting an 'Access is denied' error, which is
pasted in below. I have given IUSR_MACHINENAME full control authorization on
the Winword.exe file (and the whole Office11 folder), but it still won't
execute. Impersonation is disabled. What am I missing?

******* Copy of Error *********************
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.UnauthorizedAccesception: 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.

Source Error:


Line 15: Dim MyDoc As Object
Line 16:
Line 17: MyWordObject = Server.CreateObject("Word.Application")
Line 18: MyDoc = MyWordObject.Doents.Add
Line 19: MyDoc.contents = "This is a test."


Source File: d:\inetpub\wwwroot\HJ\HJournals.aspx.vb Line: 17