Resolved: The given assembly or codebase was invalid error by stsadm command


I was trying to register custom profiledeletehandler by using stsadm command line utility. My command, code and assembly were perfect. But even then when I was trying to execute stsadm then it was displaying “The given assembly or codebase was invalid”.

Humnnn what could be the problem then after doing some research I came to know that I wrote the part of the command in notepad first and then copy/paste this part in command line. OMG, that was some encoding problem while copy/pasting the command.

Though if you delete the stsadm command and retype this in command line console then both (earlier & retyped) will look same. But this was only and major difference and solve the problem.

Solution: Please type the whole command by your own including each and everything.

Moral of the Story:

1. Avoid copy/pasting the stsadm command from other application as you can be the victim of this type of problem.

2. Always do check for PublicKeyToken values (If u are using assembly reference) twice and other spelling mistakes in stsadm command, as it can be the cause of these type of problems.

Advertisements

2 thoughts on “Resolved: The given assembly or codebase was invalid error by stsadm command

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s