ASP No such interface supported error when creating object

痞子三分冷 提交于 2019-12-10 12:44:41

问题


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.


回答1:


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.




回答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.



来源:https://stackoverflow.com/questions/15271899/asp-no-such-interface-supported-error-when-creating-object

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!