Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 23rd, 2006, 03:55 AM
Friend of Wrox
 
Join Date: Aug 2006
Location: , , .
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to vantoko
Default Could not load file or assembly

Hi,

From time to time I get the following error. When recopying the file that causes the error to the production server solves the problem.
I deployed by copying all files to the server.

this is the error :

Could not load file or assembly 'myassembly' or one of its dependencies. The system cannot find the file specified. It then says: WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\......] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\.....]

does anyone know how to solve this ?


  #2 (permalink)  
Old August 24th, 2006, 04:11 PM
Authorized User
 
Join Date: May 2006
Location: , , .
Posts: 99
Thanks: 0
Thanked 1 Time in 1 Post
Default

The most probable reason is that the assembly can't be loaded from the GAC or from the project's BIN folder. I just resolved a bad reference to the System.EnterpriseServices assembly. There are three ways to solve the problem.

The first and easiest is to just place a reference to the assembly which will load it to your BIN folder. However, this is only a temporary solution and you'll probably end up doing this with all of your projects.

The second is to use the configuration tool in the administrator tools of the start menu (start/control panel/administrator tools/NET framework 2.0 configuration), to remove the assembly and then reinstall it. If you've never used the configuration tool, this might not be a good option, but it is a long term solution. Alternatively, you can use the GACUtil tool from the command line.

Easier, but time consuming, is to have Visual Studio repair itself using Add/Remove Programs.

  #3 (permalink)  
Old August 25th, 2006, 01:27 AM
Friend of Wrox
 
Join Date: Aug 2006
Location: , , .
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to vantoko
Default

Hi,

I also assumed it had something todo with the GAC.
Unfortunatly I wrote the control myself.

So I think I need to redeploy all my code everytime I make a change.

Or there must be another way ?

Since it is hosted in a shared hosting environment I cannot use all those tools :(

  #4 (permalink)  
Old August 25th, 2006, 01:58 AM
Authorized User
 
Join Date: May 2006
Location: , , .
Posts: 99
Thanks: 0
Thanked 1 Time in 1 Post
Default

If you can't deploy to the GAC, then the only option is to deploy the control assembly to the BIN folder. Unless you make changes to the control assembly, you shouldn't have to redeploy it whenever a change is made to something else. If you do, then it might be time to get the assistance of hosting tech support.

  #5 (permalink)  
Old August 27th, 2006, 02:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You may have the default version number in AssemblyInfo.cs if this is a separate project that compiles into its own DLL. I always recommend using only the first 2 digits in the version to avoid breaking the references every time you compile.

"1.0" is a good version that won't change every time you compile. "1.0.0.*" will cause it to change the build number after every compile, and because of this change you have to re-deploy the assembly even if it wasn't changed.

Eric

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not load the assembly Jitender BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 6 September 5th, 2008 05:06 PM
Parser error could not load the assembly Kamal_Bhola ASP.NET 2.0 Professional 6 July 20th, 2007 03:04 PM
Parser Error - Could not load the assembly 'App_W jamara ASP.NET 2.0 Professional 1 March 5th, 2007 03:02 PM
Could not load file or assembly 'dll' or one of it Mahenj ASP.NET 2.0 Professional 1 January 17th, 2007 12:21 PM
Could not load file or assembly 'DLL' or one of it Mahenj BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 January 17th, 2007 10:16 AM



All times are GMT -4. The time now is 08:56 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.