I have made a WCF Service Library projects. I added a reference of a c++ DLL . The Methods exposed by the WCF Service Call the c++ DLL functions. The Client is written in VBA(excel)
I can not Step into the C++ code whole debugging. Can someone guide me ?
I fixed it. Added the C++ project to the same solution of WCF Service and it worked
Related
I would like to mimic the behaviour of a VB6-Active-X-Exe.
To do that, I have created a new project and set its settings to "COM Visible=True".
I can now add this .exe to my main application, and I can call it, call functions in that .exe, etc.
However, it is not really out of process, I think.
I would therefore like to investigate more about such an .exe's behaviour.
But I did not find any official documentation on it.
Can somebody tell me where to find more info?
Thank you!
Out-of-process COM servers (ActiveX EXE's) are not as easy to create with VB.NET as they were with VB6. When you reference a .NET executable (as a .NET assembly reference, not as a COM reference) from another .NET project, it always treats it as in in-process library. The .NET Framework has no direct equivalent to COM's out-of-process servers. Typically, in such scenarios, it is recommended that you create a WCF service, a web service, or use .NET remoting. WCF services are preferred since they use the most modern technology of the three.
However, since .NET supports COM interoperability, it is technically possible to create a .NET executable which can be registered as a out-of-process COM server. Then, when another .NET project references it via COM (rather than as a .NET assembly reference) it will run out-of-process. Microsoft provides an example of how to do that here.
However, if you don't need it to be COM (so that it can be used by non-.NET applications), I would recommend that you go the pure .NET WCF service route.
I really want to develop using the WCF Service Library template, but I am concluding that it is not available on the express version. Can anyone confirm? I've tried the installVStemplates, and re- installing the software. No luck it seems. Am hoping I might be wrong somehow.
A WCF Service Library is, in essence, a class library (DLL) that contains the service contract and its implementation (or just the implementation if the contract is in a separate project).
While the WCF Service Library template is a convenient way to create a WCF Service library, the only things it adds are the IService1.cs/vb interface, Service1.cs/vb implementation, some boiler plate code, and references to System.Runtime.Serialization and System.ServiceModel.
If you don't have the template, you can do the following:
Create a new Class Library in the language of your choice.
Rename Class1.cs to your service name.
Add an interface for the service contract.
Add a reference to System.ServiceModel and System.Runtime.Serialization (the latter if you'll be using DataContracts).
I haven't used the express editions since 2010, and I don't remember if you can create class libraries with Visual Web Developer Express, so you might need to use Express 2013 for Windows Desktop.
It's a little extra work without the template (about 5 minutes or less), but you can still do it.
Im required to write a Silverlight application using WCF.
I'm also required to use Dependency Injection to gain access to this service in another library.
(I add a Silverlight enabled WCF Service)
The problem is in trying to use Dependency Injection (Prism/MEF in this case). When I make a Silverlight Shared library that will have interfaces for this service, I cannot add this library in the ASP.Net project due to the fact that it is Silverlight library. If I make a non-Silverlight library I cannot add that library to other projects to share that common interface.
Basically I need a library I think to share between projects in Silverlight so I can do this service injection.
Any information is appreciated
As slugster said - this done via linking to windows library files from silverlight library.
You do it as described here: http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/01/20/linking-files-in-visual-studio.aspx
I just wanted to add.. Since you go there - what you need is another Framework/Technology. Usually those classes you talking about depend on other classes/namespaces that live in windows only or silverlight only world. And then you need to transfer object data via wire.
Microsoft's solution to this - RIA Services. What it does - it takes your Windows classes and generates proxy classes on Silverlight side. Kind of what you need. And it works with WCF services.
There is 3rd party solutions like CSLA and DevForce.
I use DevForce and it does many things automatically, but instead of generating proxy classes - it creates links just like what you want.
Whether you realise it or not, your question is a duplicate of this one: Shared data object between WCF service and Silverlight app While not asked the same way, the answer is the same.
You need to create a separate project, and share the code files (as links) from one project to the other. Your problem is that the Silverlight project is compiled for a different runtime to the ASP.NET/WCF project. Because they cannot reference a common library, linking the shared files as mentioned is the easiest way to share code between the two projects targetting different runtimes.
I have a VB6 application that needs to communicate with a VS2008 VB.NET WCF server. I have built a VB.NET WCF DLL to be used on the client side, and it --almost-- works with the VB6 application. When I try to run the VB6 app in debug mode, I get "Could not find endpoint element with name 'NetTCPBinding_IComPortManager' and contract 'IComPortManager' in the ServiceModel client configuration section." Using a dummy VB.Net client app, with the same WCF DLL works fine. I presume that the VB6 app/WCF DLL is not finding app.config. Where should app.config be ? Is there a way to tell WCF where to find app.config ?
The app.config should be named as if your host was a .NET app, i.e.
YourAppName.exe.config
My answer here describes all the issues regarding VB6 and exe.config files.
I have a third party COM component (they don't offer a .Net assy), that has the additional feature that it only works under x86 compile.
I am trying to wrap this in a WCF service, but if I select x86, the service won't start (System.BadImageFormatException).
Any workarounds for this ?
Thanks
Larry
The issue is that the VS2008 WCF debugger will only start up in 64bit. I solved the problem by creating a 32bit host and running that