locked
Cannot create ActiveX component RRS feed

  • Question

  • User-1028785120 posted

    In visual studio I coded for open an instance of an Autodesk Inventor in a web application using vb.net.The code is executed correctly in local.but when I am trying to host the file in IIS and try ,then it is not working some error will showing.This problem is also get when the visual studio is open as administrator mode and run.

    here is my code

    Dim apprentice As New Inventor.ApprenticeServerComponent()
    
            GetInventorApplicationObject()
            inventorApp.Visible = True
            Dim oDoc As Document
            oDoc = inventorApp.Documents.Open("F:\inventor\Proof Of Con\Cube_update.ipt")
    
     Sub GetInventorApplicationObject()
    
            If inventorApp Is Nothing Then
                inventorApp = CreateObject("Inventor.Application")
            Else
                inventorApp = GetObject("Inventor.Application")
            End If
    
    
        End Sub

    The Error Showing is,...

    Cannot create ActiveX component.

    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.Exception: Cannot create ActiveX component.

    Source Error:

    Line 335: Line 336: If inventorApp Is Nothing Then Line 337: inventorApp = CreateObject("Inventor.Application") Line 338: Else Line 339: inventorApp = GetObject("Inventor.Application")

    Source File: F:\inventor\Proof Of Con\WebSite14\Default.aspx.vb Line: 337

    anyone know what is the issue?




    Wednesday, August 14, 2013 4:59 AM

Answers

  • User-760709272 posted

    You need to install the application on your server.  Unless this app was written with this kind of automation in mind, it is highly unlikely it is going to work.  If the app needs access to the desktop, or can't run in a multi-threaded environment you won't be able to do this.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 14, 2013 6:06 AM