ebarnhorst
I'm getting the following info in the log file when I try to launch the adapter for the dotnetstocklistdemo (built from the example code).
The dll builds fine (VS.net 2005) targetting .net 2.0 and 1.1 but I always get the same message. Am I missing something? The pre-built .net example code works fine.
2007-02-12 17:33:36,407 [3272] INFO Lightstreamer.DotNet.Server.ServerMain [(null)] - Lightstreamer .NET Adapter Server starting...
2007-02-12 17:33:36,454 [3272] FATAL Lightstreamer.DotNet.Server.ServerMain [(null)] - Exception caught while starting the server: The format of the file 'lightstream-test1.dll' is invalid., aborting...
System.BadImageFormatException: The format of the file 'lightstream-test1.dll' is invalid.
File name: "lightstream-test1.dll"
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at Lightstreamer.DotNet.Server.NetworkedServerStarter..ctor(String host, Int32 rrPort, Int32 notifPort, String className, IDictionary parameters, String configFile)
at Lightstreamer.DotNet.Server.ServerMain.Main(String[] args)
=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\Lightstreamer\test\Deployment_DotNet_Server\dotnet_1.1\lightstream-test1.dll
LOG: Appbase = C:\Lightstreamer\test\Deployment_DotNet_Server\dotnet_1.1\
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Lightstreamer/test/Deployment_DotNet_Server/dotnet_1.1/lightstream-test1.dll.
EriOor
Hi ebarnhorst,
I've had the exact same problem when I tried to build the Demo project in Visual Studio 2005.
I was using the .Net 1.1 reference while Visual Studio 2005 build projects using the .NET 2.0 compiler. For me, this caused the problem.
I fixed it by referencing the DotNetAdapter_N2.dll and building it again.
Of course DotNetAdapter_N2.dll, DotNetServer_N2.exe and the .NET 2.0 version of log4net.dll should be included in the \adapters\StockList\DotNetAdapter\dotnet_2.0 folder as well.
I hope this helps!
Kind regards,
Erik.