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

H

Hedley

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
Class();
-start the service and get the error from the test client.

Can someone straighten me out?

Thanks!
 
Joined
Nov 8, 2013
Messages
1
Reaction score
0
Hello Hedley

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

Regards
Ramakrishnan

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
Class();
-start the service and get the error from the test client.

Can someone straighten me out?

Thanks!


--------------------------------------------------------------------------------

HedleySohn
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top