Using classes from a C++/CLI dll inside a WCF service - beginner

Discussion in 'ASP .Net Web Services' started by Hedley, Dec 20, 2008.

  1. Hedley

    Hedley Guest

    We are planning to move to an SOA using WCF. We have many 32 bit legacy code
    dlls (C++) that we plan to wrap with C++/CLI. The WCF services will then
    reference those C++/CLI libraries for functionality that will be exposed
    through the services. We are using VS2008 SP1 with .NET3.5 SP1 on Vista 64.

    I have successfully wrapped some of the legacy dlls at this point. However
    when I try and call the CLI code from methods in a test service, the WCF Test
    client immediately fails: "Failed to invoke the service. Possible causes: The
    service is offline or inaccessible; the client-side configuration does not
    match the proxy; the existing proxy is invalid. Refer to the stack trace for
    more detail. You can try to recover by starting a new proxy, restoring to
    default configuration, or refreshing the service..."

    So, I'm obviously missing something.

    This is easily reproduceable:
    -create a Visual C++ CLR Library
    -Create a simple class called Class1 in the CLR library
    -Create a WCF Service Library, reference the CLR Library
    -In the wizard created GetDataUsingDataContract() method, add Class1 c = new
    -start the service and get the error from the test client.

    Can someone straighten me out?

    Hedley, Dec 20, 2008
    1. Advertisements

  2. Hedley


    Nov 8, 2013
    Likes Received:
    Hello Hedley

    Do you find anything...??? useful
    Im trying the same way. can you please help me out.
    Can you please share some samples


    Ram245, Nov 8, 2013
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.