Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NonComVisibleBaseClass was detected; How do I fix this?

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

like image 615
Hcabnettek Avatar asked Jun 26 '09 15:06

Hcabnettek


1 Answers

I have recently discovered this error in a totally unrelated scenario to yours.

  1. Navigate to Debug->Exceptions...
  2. Expand "Managed Debugging Assistants"
  3. Uncheck the NonComVisibleBaseClass Thrown option.
  4. Click [Ok]

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

like image 193
Jeremy Avatar answered Nov 10 '22 20:11

Jeremy