all groups > visual studio .net enterprise tools > september 2005 >
You're in the

visual studio .net enterprise tools

group:

Asp.Net and Createobject failure



Asp.Net and Createobject failure Sherpa Tenzing
9/26/2005 12:51:03 PM
visual studio .net enterprise tools: I am trying to load Word Object to do some VBA automation within my ASP.NET
webservice. I am not able to create the object. I get the following error
System.Exception occurred in Microsoft.VisualBasic.CreateObject
Cannot create ActiveX component.
at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String
ServerName)

I am working on WIndows XP machine.

The webconfig for asp.net app is:
"
<authentication mode="Windows" />
<identity impersonate="true" />
<deny users="?" />
<allow users="*" /> <!-- Allow all users -->
"

IIS directery has security set at low and all read/write/ execute options
enabled. The code works fine in a VB form.


The code snippet:
"
Imports System.Runtime.InteropServices.Marshal

Public Class TWordObj
Public Sub CreateLabels()

Dim oApp As Word.Application
Dim oDoc As Word.Document

'Start a new document in Word
oApp = CType(CreateObject("Word.Application"), Word.Application)
oDoc = oApp.Documents.Add
"


Re: Asp.Net and Createobject failure bprataps NO[at]SPAM gmail.com
9/30/2005 3:52:47 AM
Assign the ASPNET account, on your server, Administrator privileges ..
and try... all the best.
AddThis Social Bookmark Button