1

I am actually a java/jsp programmer and I am newbie to vb.net. I wonder if I can combine a project made in vb.net 2008 with a vb.net website (like servlet in java)

I have a ready made project with assembly .dll file that is based on 2.0 .net framework. This project (software) actually to connect it to a handkey 2 hardware. It register users to the handkey. I want to deploy it to the internet as a website.

-----What I have try so far----

I have created a new website (in vb.net 2008) and add the dll as a reference but it send this error Could not load file or assembly 'RsiDotNetDLL, Version=2.4.0.3, Culture=neutral, PublicKeyToken=11d948a84312b819' or one of its dependencies. An attempt was made to load a program with an incorrect format.

darkerror
  • 67
  • 9
  • 1
    Make sure your website is targetting the same architecture as the dll i.e. is it Any CPU, X64, or X32. This needs to match the assembly. – Matt Wilko Jan 14 '16 at 11:56
  • Thank @MattWilko for your reply but I click "Build" then "Configuration Manager"and I can only see "Any CPU" there – darkerror Jan 14 '16 at 12:18
  • 1
    You need to add a new configuration then. – Matt Wilko Jan 14 '16 at 12:19
  • I really appreciate your help. dll seems to be x64. Do you know how to add this same configuration for web. I've been trying since you replay. – darkerror Jan 14 '16 at 14:47
  • See: http://stackoverflow.com/questions/41449/i-get-a-an-attempt-was-made-to-load-a-program-with-an-incorrect-format-error-o – Matt Wilko Jan 14 '16 at 14:48

1 Answers1

1

I just want to share my solution

I have fixed this by open this website with visual studio 2015, select Debug---> Options---> Projects and Solutions---> Web Projects and tick the option "Use the 64 bit version of IIS Express for web sites and projects"

Thanks

darkerror
  • 67
  • 9