If you are trying to use an ASP.NET web custom control and you receive the above error.
Make sure that you specify the name of the assembly and not the complete or partial path to the assembly in the register directive.
Example:
Lets assume you have a name space called MyNameSpace and a dll file called MyNameSpace.dll that contains that name space.
The following 2 variations will produce this error:
<%@ Register TagPrefix="MyNS" Namespace="MyNameSpace" Assembly="~/Bin/MyNameSpace.dll" %>
<%@ Register TagPrefix="MyNS" Namespace="MyNameSpace" Assembly="~/Bin/MyNameSpace" %>
The problem is that you must not use the path or file name of the dll in the assembly property of the register directive.
To solve the problem only specify the assembly name in the assembly property of the register directive:
<%@ Register TagPrefix="MyNS" Namespace="MyNameSpace" Assembly="MyNameSpace" %>