Last post Jul 09, 2013 01:38 AM by athulksurendran
Jul 08, 2013 09:15 AM|athulksurendran|LINK
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.
my code is ..
Dim apprentice As New Inventor.ApprenticeServerComponent()
inventorApp.Visible = True
Dim oDoc As Document
oDoc = inventorApp.Documents.Open("F:\inventor\Proof Of Con\Cube_update.ipt")
If inventorApp Is Nothing Then
inventorApp = CreateObject("Inventor.Application")
inventorApp = GetObject("Inventor.Application")
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.
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?
Jul 08, 2013 11:07 AM|sridhar_rs|LINK
Server.CreateObject is available to use it in ASP.NET.
Have you migrated Clasic ASP to ASP.NET? If so, add a reference to the DLL, and Visual Studio will create a wrapper for the COM object. Then you can instantiate the control in your code in the following way,
Dim obj As Inventor.Application
obj = New Inventor.Application()
Jul 09, 2013 01:38 AM|athulksurendran|LINK
I have not migrated from classic ASP to ASP.NET .I had created the website itself in .NET 4.5