Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP No such interface supported error when creating object

I have a windows forms application that has third party ocx controls. Following command is used to create an object at runtime.

myObject = myApplication.CreateObject("ML.MFinder", True)

this is working properly and progID is also correct. Problem is when doing the same in asp project where I get following error:

System.Runtime.InteropServices.COMException: No such interface supported

at ML.MApplicationClass.CreateObject(String ProgID, Boolean Allocate)

Strange because other ocx objects works properly also on asp project. I am using IIS 5.1, windows XP Pro SP3 and framework 3.5. Also I registered ocx manually.

like image 421
Jaume Avatar asked Mar 07 '13 12:03

Jaume


2 Answers

Does this ocx control need any specific read write access on the file system? If so then you need to give rights on file-system level: IUSR_XXXXX = READ + EXECUTE.

You should also check if any dependency is missing using Dependency Walker tool.

Are you getting any class id in the exception? If so then check if that classid is present in the registry.

like image 106
Amit Rai Sharma Avatar answered Sep 19 '22 11:09

Amit Rai Sharma


Under IIS you don't have the same rules to access external files or dlls. I think with OCX files the IIS can be even more restrictive.

I don't think the problem is the reference or something like that. As you said, you have already registered the OCX, but do this OCX has also some dependencies? They need to be properly registered as well.

like image 30
Rafa Avatar answered Sep 18 '22 11:09

Rafa