0

I am exploring NetworkCommsDotNet library for use in a project. I am building the project fine, but when it reaches TCPConnection.StartListening (NetworkComms dll function) I see in IntelliTrace exceptions thrown that say "could not load assembly blah blah blah".

I have attached the fusion log, any ideas? I an stumped... :/

EDIT: I should add that the dll is actually there and has its permissions set to Everyone - Full Control. It is also "unblocked" in its file properties. Also Owner is Everyone.

EDIT2: https://i.stack.imgur.com/bWBSz.jpg

*** Assembly Binder Log Entry  (3/12/2013 @ 10:58:45 ΟΞΌ) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable  C:\Users\Administrator\Documents\Visual Studio 2012\Projects\CCF_PwrMon_Test_Server\CCF_PwrMon_Test_Server\bin\Release\CCF_PwrMon_Test_Server.vshost.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\Users\Administrator\Documents\Visual Studio 2012\Projects\CCF_PwrMon_Test_Server\CCF_PwrMon_Test_Server\bin\Release\NetworkCommsDotNetComplete, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
LOG: Appbase = file:///C:/Users/Administrator/Documents/Visual Studio 2012/Projects/CCF_PwrMon_Test_Server/CCF_PwrMon_Test_Server/bin/Release/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = CCF_PwrMon_Test_Server.exe
Calling assembly : (Unknown).
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: Using application configuration file: C:\Users\Administrator\Documents\Visual Studio 2012\Projects\CCF_PwrMon_Test_Server\CCF_PwrMon_Test_Server\bin\Release\CCF_PwrMon_Test_Server.exe.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Attempting download of new URL file:///C:/Users/Administrator/Documents/Visual Studio 2012/Projects/CCF_PwrMon_Test_Server/CCF_PwrMon_Test_Server/bin/Release/NetworkCommsDotNetComplete, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
LOG: All probing URLs attempted and failed.

</pre></html><meta http-equiv="Content-Type" content="charset=unicode-1-1-utf-8"><!-- saved from url=(0015)assemblybinder: --><html><pre>
*** Assembly Binder Log Entry  (3/12/2013 @ 10:58:45 ΟΞΌ) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable  C:\Users\Administrator\Documents\Visual Studio 2012\Projects\CCF_PwrMon_Test_Server\CCF_PwrMon_Test_Server\bin\Release\CCF_PwrMon_Test_Server.vshost.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\Users\Administrator\Documents\Visual Studio 2012\Projects\CCF_PwrMon_Test_Server\CCF_PwrMon_Test_Server\bin\Release\NetworkCommsDotNetComplete, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
LOG: Appbase = file:///C:/Users/Administrator/Documents/Visual Studio 2012/Projects/CCF_PwrMon_Test_Server/CCF_PwrMon_Test_Server/bin/Release/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = CCF_PwrMon_Test_Server.exe
Calling assembly : (Unknown).
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: Using application configuration file: C:\Users\Administrator\Documents\Visual Studio 2012\Projects\CCF_PwrMon_Test_Server\CCF_PwrMon_Test_Server\bin\Release\CCF_PwrMon_Test_Server.exe.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Attempting download of new URL file:///C:/Users/Administrator/Documents/Visual Studio 2012/Projects/CCF_PwrMon_Test_Server/CCF_PwrMon_Test_Server/bin/Release/NetworkCommsDotNetComplete, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
LOG: All probing URLs attempted and failed.
MemCtrl
  • 131
  • 1
  • 11
  • Looks to me that somebody is calling Assembly.LoadFrom() and completely fumbled the argument, passing an fully qualified assembly name instead of the path to the file. That should be Assembly.Load() instead. If that somebody is you then stop using Assembly.Load/From() for a while. Just add a reference to the assembly instead. – Hans Passant Dec 03 '13 at 10:11
  • Thanks for the reply. I am not loading the dll programmatically, I have added a reference to it. I am also using mysql.data.dll and that works. – MemCtrl Dec 03 '13 at 10:15
  • Post the stack trace so it is at least obvious where this call originated from. Also document where this DLL came from. If it is from a book then look for the inevitable errata. – Hans Passant Dec 03 '13 at 10:19
  • Thanks for your time. Dll was downloaded from here: http://www.networkcomms.net/download/ It doesn't crash, it just throws an exception. I have posted a screenshot of the call trace. – MemCtrl Dec 04 '13 at 09:59
  • Heya MemCtrl. I'm one of the developers for NetworkComms.Net. How come you haven't given us a quick shout on our forums - http://www.networkcomms.net/forums/forum/support-2/? What happens if you inspect the property NetworkComms.NetworkIdentifier in your program before any other library access? Do you still get a similar exception? – MarcF Dec 19 '13 at 13:39
  • Also having checked our source we do not use Assembly.LoadFrom or Assembly.Load. This exception must be happening when the main NetworkComms.Net assembly is loaded. Can you provide more information about your execution environment? – MarcF Dec 19 '13 at 13:43
  • I am running this on a Windows Server 2008 R2 x64. Any logs I should provide? – MemCtrl Dec 21 '13 at 11:17
  • @MemCtrl - The library has recently been updated. Any chance you could see if this problem still occurs? – MarcF Apr 01 '14 at 22:33
  • The beta of 3.0 worked fine, I am now in the process of testing the release version. – MemCtrl Apr 02 '14 at 10:04

1 Answers1

0

The problem was solved by using the updated version of NetworkCommsDotNet.

MemCtrl
  • 131
  • 1
  • 11