Fail to add external C++ DLL to my ASP.NET 2.0 project

Discussion in 'ASP.NET 2.0' started by niceshoporg, Mar 6, 2007.

  1. Hello,

    I have a problem. I cannot add a DLL file to the bin folder that has been created from a Visual C++ class library project. In Visual Studio, suppose I go Visual C++ -> CLR ->Class Library and call it MyClass. Then I just compile it without adding any code. Then I add MyClass.dll to the .bin folder. I use an empty class here just to simplify my problem. As a matter of fact, I have also tried an received the same type of error messages for a genuine C++ DLL that I tried to add as a reference in the Bin folder. This time it also worked on my local IIS server but failed on the remote server.
    It woks fine on my Local IIS server, but fails on a remote shared server. The error message is:
    FileLoadException: Could not load file or assembly 'MyClass, Version=1.0.2621.37702, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    I don?t have administrator privileges on this server (discountasp.net). Is it necessary for this dll file MyClass.dll to be registered on this remote server in order for my site to function with this reference?

    Thanks
     
  2. Did you compile it using Visual Studio 2005 with SP1? If so, it will not work because the latest version of the Visual C++ Runtime is not installed on the servers. I've already notified our sys admins if we can get the latest version installed.

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. You don't have SP1. SP1 version will show something like SP.050727-7600. Yeah, make sure you should upload the release version.


    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. Uploading the release version of the C++ DLL instead of the debug version did the trick.


    Thanks
     
  5. I don't think I have SP1. But just to be sure, how can I determine whether my Visual Studio 2005 has SP1? Anyway, here is the information I get when I click Abut Microsoft Visual Studio under help:

    Microsoft Visual Studio 2005
    Version 8.0.50727.42 (RTM.050727-4200)

    It doesn't say anything about SP1.

    I suppose it has to be something else if I have the original version of VS 2005 without SP1. I have received information from discountasp.net customer support that it is important that the release version and not the debug version of the C++ be uploaded. I will look into this and I get back with the result.

    Thanks,
     

Share This Page