9

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.

Jaume
  • 3,318
  • 16
  • 50
  • 108

2 Answers2

2

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.

Rafa
  • 2,218
  • 3
  • 24
  • 43
2

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.

Amit Rai Sharma
  • 3,427
  • 25
  • 35
  • no class id in the exception. I already set permissions for IUSR_ account but no success. However, thank you for the tips, I didn't know this point. If permissions are ok, how to proceed? "no such interface error" is still shown. – Jaume Mar 11 '13 at 16:49
  • @Jaume: Can you share some more code like the procedure where you are creating this object? Also are you using asp or asp.net? – Amit Rai Sharma Mar 11 '13 at 23:00
  • thanks for the tips, I created a new thread once webservice method is called. Then, inside that thread, no errors were reported. Thank you. – Jaume Mar 13 '13 at 15:48