检测到 NonComVisibleBaseClass; 我该如何解决?
我的类派生自 System.Web.Security.MembershipUser 我在提交表单时收到此错误。 弹出表单使用 ASPPDF,并且应用程序在实现自定义 MembershipProvider 功能之前没有此问题。 请注意,这只是一个调试错误。 当我不调试时它似乎可以工作。 有谁知道我该如何解决这个问题?
检测到 NonComVisibleBaseClass 消息:进行了 QueryInterface 调用,请求 COM 可见托管类“XyAmpUser”的默认 IDispatch 接口。 但是,由于此类没有显式默认接口并且派生自非 COM 可见类“System.Web.Security.MembershipUser”,因此 QueryInterface 调用将失败。 这样做是为了防止非 COM 可见基类受到 COM 版本控制规则的约束。
谢谢, 〜ck在圣地亚哥
My class derives from System.Web.Security.MembershipUser
I am getting this error when submitting the form. The popup form uses ASPPDFand the application did not have this problem before implementing the custom MembershipProvider goodies. Note this is a debugging error only. It seems to work when I am not debugging. Does anyone know how I can fix this?
NonComVisibleBaseClass was detected
Message: A QueryInterface call was made requesting the default IDispatch interface of COM visible managed class 'XyAmpUser'. However since this class does not have an explicit default interface and derives from non COM visible class 'System.Web.Security.MembershipUser', the QueryInterface call will fail. This is done to prevent the non COM visible base class from being constrained by the COM versioning rules.
Thanks,
~ck in San Diego
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我最近在与您的情况完全无关的情况下发现了此错误。
这里有更多信息,这可能会有所帮助。
只是为了保持最新状态:
在 Visual Studio 2019 中:调试菜单,Windows --> 例外设置,打开例外设置窗口。 展开“托管调试助手”,最后取消选中 NonComVisibleBaseClass
I have recently discovered this error in a totally unrelated scenario to yours.
Here is more information, which may help.
Just to keep this up to date:
In Visual Studio 2019: Debug Menu, Windows --> Exception settings, opens the Exception settings window. There expand "Managed Debugging Assistants" and finally uncheck NonComVisibleBaseClass
这告诉你:
您的项目包含一些基于 COM 的对象,这些对象未使用公共使用密钥进行签名。
对于这种情况有 2 个解决方案:
1- 从调试器设置中取消选中 NonVisibleCome 选项
2- 找到您的对象代码对其进行签名并重建它。
this is telling you that:
Your project contains some COM based objects which is not signed with a key to public usage.
There are 2 solution to this case:
1- Uncheck NonVisibleCome choice from the debugger settings
2- Find your objects code sign it and rebuild it.