Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Feb 2007
    Location
    toronto
    Posts
    1

    problem building example adapter

    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(AssemblyNa me 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\dot net_1.1\lightstream-test1.dll
    LOG: Appbase = C:\Lightstreamer\test\Deployment_DotNet_Server\dot net_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.

  2. #2
    Member
    Join Date
    Mar 2007
    Location
    Dus
    Posts
    5

    Lightbulb

    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.

 

 

Similar Threads

  1. Replies: 4
    Last Post: February 3rd, 2011, 10:33 AM
  2. Replies: 3
    Last Post: January 7th, 2010, 08:57 AM
  3. Replies: 9
    Last Post: June 3rd, 2009, 09:56 AM
  4. Replies: 2
    Last Post: March 19th, 2008, 10:19 AM
  5. Building a new Adapter using .NET
    By sjohn in forum Adapter APIs
    Replies: 1
    Last Post: February 11th, 2008, 10:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 12:48 PM.