Pregunta

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.

¿Fue útil?

Solución

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.

Otros consejos

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top