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.
Related
I have .net core project, When i build that project it generates .exe file but not .dll, My requirement is to create .dll of project and host it in IIS server. how to generate .dll file,what settings need to be done.
An ASP.Net Core binary is meant to be a self-hosted application, so the .exe embed a web server (the default one being Kestrel) that can accept HTTP requests. One of the challenges behind ASP.Net Core was to make it self-contained and decoupled from IIS. So having an .exe is perfectly expected, you can double click on it and you'll get a web server running.
That being said, in a standard production environment, you are supposed to have a webserver like IIS sitting in front of your ASP.Net Core app and acting as a reverse proxy, forwarding the requests to the app. So having an .exe file will not prevent you from hosting behind IIS.
I learned a lot from this article: https://weblog.west-wind.com/posts/2016/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS
If there is a way to create a DLL with ASP.Net Core, I don't know it, but what would be the point?
Switching the output type in your project properties to Class Library from Console Application will generate a DLL instead of an EXE.
How do you consume a wcf service with jscript.net but not using any html? My wcf service is working fine and I am using it with other programs but I don't know how to reference it with soley jscript.net code. I am trying to write a script for a Lawson Smart Office Panel and it uses jscript.net (why use jscript.net? it's coded in c#. real dumb) so I need to call my wcf service but don't know how. My wcf service uses a net/tcp endpoint and its running on a virtual machine on the same network. I tried using DashboardTaskService.Manager.LaunchTask(uri) but I don't think that's the right direction.
http://smartofficeblog.com/2013/06/20/script-assemblies-in-mforms/
If you work like this you get to write C# code and use it as a Jscript in M3, I would never go back to just writing Jscript.
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 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
I want to add non-silverlight assembly to a silverlight project,
is there any way to do this? or what will be the other option to do ?
As Andrey writes, it's impossible to add a non-Silverlight assembly to a Silverlight project. If you really need to use it, you have no option but to run it server-side. You may already have a Web project that goes with the Silverlight project, and if so, that's where you should add a reference to this assembly.
The technology used to make remote calls from Silverlight to the web project is WCF RIA Services. The page I linked to contains plenty of documentation and videos to help you learn about WCF RIA Services.
There are, however, a few situations in which this approach won't work. Perhaps none of them apply to your circumstances, but since you don't provide any details about this assembly, I can't be sure.
If, for example, your assembly contains some WPF controls and you want to add them to your Silverlight application, you're out of luck. You'll have to find Silverlight-specific equivalents.
If you'll be calling this assembly frequently, you might find your Silverlight application spending a lot of time waiting for the server to respond. This could slow your application down significantly.
If your application needs to be able to run out-of-the-browser and disconnected from the internet (a requirement of my current Silverlight project), you will also be out of luck.
There are a number of things that I can think of that should work reasonably well over WCF RIA Services:
sending email, calling web services or various other network-related activities,
talking to a database,
mathematical calculations.
It is impossible because Silverlight has different runtime from full .net framework. The common way to solve it is to create WCF service that will have access to that assembly and provide remote access for Silverlight application.