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 2 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

Add comment


(Will show your Gravatar icon)  

  Country flag





Live preview

11/19/2008 7:05:56 PM

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. I am currently stuck in C++ and sniffing .NET.

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

<<  November 2008  >>
MoTuWeThFrSaSu
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

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 2008

Sign in