The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

by APIJunkie 12/20/2007 10:25:00 AM

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" %>

 

Currently rated 5.0 by 4 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.NET | ASP.NET

Comments

12/20/2007 11:21:38 AM

trackback

Trackback from DotNetKicks.com

The given assembly name or codebase was invalid

DotNetKicks.com

Comments are closed

Powered by BlogEngine.NET 1.2.0.0
Theme by Mads Kristensen

About the author

Name of author

My name is Bacon…James Bacon.

I am an API wars veteran I was wounded by x86 assembly, recovered and moved on to C. Following a long addiction to C++ and a short stint at rehab I decided to switch to a healthier addiction so I am now happily sniffing .NET and getting hooked on Silverlight.

I am mainly here to ramble about coding, various API’s, Junkies(me especially) and everything else that happens between coders and their significant other.

E-mail me Send mail


Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Sign in