Message 1 of 1
Access denied while using System.Activator.CreateInstance() from IIS

Not applicable
10-03-2016
06:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I am creating inventor instance in my standalone C# .net console application. I am calling this EXE from my .NET web application. It works fine while debugging, i.e inventor instance gets created successfully. But when I deployed the web application on IIS (Version 1511 on Windows10) and tried to run this standalone EXE, I am getting exception as follows, "System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {B6B5DC40-96E3-11D2-B774-0060B0F159EF} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))." I am creating instance as follows, void createInventorInstance() { try { if (m_inventorApp == null) { Type inventorAppType = System.Type.GetTypeFromProgID("Inventor.Application"); if (m_inventorApp == null) m_inventorApp = System.Activator.CreateInstance(inventorAppType) as Inventor.Application; // I am getting exception for this line m_inventorApp.Visible = true; } } catch(Exception exc){} } Please suggest me the way so that I can run this EXE from my web page also. Thanks, Mahesh