2.0 Equivalent of WCF Service - windows

Hosting a WCF Service Host in a Windows Service really seems to be quite a simple way to go to communicate with a running Windows Service...if you're running 3.0/3.5.
What the easiest way to get the same sorts of things out of the 2.0 Framework if that's what you're stuck with?

You could host a Remoting service.

ASMX Web Service Hosted in IIS

Related

How to map a domain name like www.something.com to Hosted ASP.NET Core 6 api as Windows Service using Kestrel server

In my current project. The previous dev has hosted an asp.net core 6 Web API as a window service using Kestrel on azure window virtual machine. I have to create a replica on the same API; please take a reference to the below links.
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/windows-service?view=aspnetcore-6.0&tabs=visual-studio
https://dev.to/sumitkharche/how-to-host-asp-net-core-3-1-web-applications-as-windows-service-52k2
I can create, build and install the API as a window service in an azure virtual machine and local machine as well, which also works in localhost: port.
Now I want to map that API to some domains like www.someting.com. But cannot find a way how to map a domain.
In this window service way, API hosting is pretty new to me, and there is also not enough documentation that can help me.
Please suggest.

What is Windows Fabric and how to host services in it?

I recently installed Windows Server Service Bus 1.0 (on a Windows Server 2008 R2 machine).
That also installs "Windows Fabric" (not AppFabric).
Could not find much information on it, and googleing it I stumbled on a Lync server post (Windows Fabric is also installed by Lync Server 2013).
Definition:
"Windows Fabric is a Microsoft technology used for creating highly reliable, distributable, and scalable applications."
From the Service Bus architecture intro,it looks like Fabric is what allows for services replication, high availabilty, and fault tolerance.
Anyone knows if that can be used to host custom .NET services? Or any kind of direction would be greatly appreciated.
Thanks in advance.
Cos
I went to a talk by Mark Eisenberg on May 28th at the Microsoft NERD Center near MIT in Boston MA. The talk was mostly about the Azure Service Fabric. General consensus was that if you're using Azure from the infrastructure as a service perspective you aren't really using it.
The next step up is to use Azure naively as a platform meaning that rather than create VMs and hosting them there you're creating cloud services and web jobs and web apps and using the new Logic Api's etc...
But if you really want to build a stateful, resilient service enterprise class you'll want to go underneath the PaaS and write against the Service Fabric directly for greater control.
That's where the money is.
I did a write up on the talk and what the Azure Service Fabric is a few days ago and posted it here.
I don't actually think that Windows Fabric is open product. It is used for infrastructure purposes, and not for deploying custom services. For your custom services you have to use platform built on top of Windows Fabric, like Service Bus, Windows Server App Fabric.
I think Windows Fabric is for internal use by Windows Azure and Private Cloud for clustering, load balancing and so on.
UPDATE:
I've started developing Windows Azure application and here is what I've found.
I've added a Service role to Azure application and started it on local development machine (under Azure emulator). And my service was published in and started under Windows Fabric!
So the conclusion is: Windows Fabric is a platform for running YOUR Cloud Services.
Fabric which the name suggests in itself, is back-end.
It is no different than iSCSI or EIGRP. The main difference is that it is generic in form rather than specific like the aforementioned services/protocols.
IIS is a server service specific to web hosting.
SQL the same but database only..
fabric, applied to host fabric aware services and software.
Windows Fabric is used internal by Microsoft to building highly available, resilient and scalable services. It has been used for Service Bus, SQL Database, Document DB etc. according to this video: Building Resilient, Scalable Services with Microsoft Azure Service Fabric
Until now it has not been available for external parties but has now been announced as Service Fabric which will be available on Windows Azure and Window Server 2016.
Read more here: http://azure.microsoft.com/en-us/campaigns/service-fabric/

Need a step-by-step WCF as Windows Service

I'm trying to find a (good) step-by-step example of creating a WCF and hosting it as a Windows Service (with installer). I'm using VS2010 and have a simple WCF with 1 function (just returns 'Hello').
Please don't Google and post; I'm looking for a resource someone has actually used. Most of the Googling I've done hasn't turned up much for what I'm trying to do.
I just want to take my WCF library, and find a way to install it as a Window Service. I've done it in 2008, but 2010 is... Different.
For future reference - for anyone else looking at this thread:
Here is the best example I've found for what this question was looking for:
CodeProject: WCF Service with Windows Service Hosting, consumed from C# App!
This link mentioned above shows how to consume the WCF service, but with a lot of other stuff to wade through:
MSDN: How to: Host a WCF Service in a Managed Windows Service!
This second link above is good for creating the WCF service, but not for consuming it:
MSDN: Hosting and Consuming WCF Services!
I rarely find MSDN articles that I like :-)
You just need to host the wcf contract class in your onstart method of service calling ServiceHost host = new ServiceHost(YourClass) and in onclose method of your service you need call host.close(). The hosting option depends on what type of clients you want to talk to if you want to talk to pure html clients using REST you need to host your service in WebServiceHost and the binding you need to use in that case is webHttpBinding.
I have followed the following example and was able to create windows service hosted wcf and im sure this what you are looking for link
I did not find any difference in creating wcf service in vs2008 and vs2010.
What type of clients do you want to talk and which protocols do you want to support. This all defines your configuration.
What I've used when I use WCF in a Windows Service is Topshelf as a Windows service framework and a modified version of this Code Project code to dynamically host, install and run WCF services.
Topshelf makes it very easy to develop and debug because it can be run as a console application. Being able to dynamically update WCF service libraries without stopping the Windows service is just cool. ;)

wcf windows service interaction

I have a windows service in which i host a wcf service.
What is the best approach to control the windows service via the wcf service? I already created the interfaces for the wcf service, but I have no idea how to interact with the windows service's classes and functions.
just to check that I'm understanding your problem correctly - you want to run a wcf service, so you create a windows service to host it, and you want your desktop client to be able to control the windows service (that's hosting the wcf service) by talking to the wcf service?
If that's the case, what is it that you're trying to do with the windows service? In some of the work I've done, I've set up the server such that there's the windows service hosting all the wcf services I want to run, and in order to interact with that windows service remotely (e.g. starting/stopping/restarting) I have another service running on the server (usually baked into the Amazon instance image so it's running on every new server that gets brought up) which my remote client can talk to instead. That way I have a means to trigger a service restart on all my servers without having to manually connect/remote desktop to each server. Of course, the second wcf service is secured by some means so it can't be exploited easily.
Is that the sort of thing you're looking to do?

Writing Windows service in WCF

I want to write windows service in wcf After searching a lot I only found were tutorials of writing webservice in wcf not windows service.
Can any one please provide a link to any tutorial which explains how to write windows service in WCF
Windows services are executables. WCF applications are, generally, web services, exposed over a URI. You can host a WCF application within a windows service, not the other way around.
To create a Windows service in C#, follow the step-by-step here. To make your Windows service WCF-enabled, if you will, create the System.ServiceModel.ServiceHost instance that will host your WCF service inside the OnStart() callback.
Good answers all of them. Just a quick note... implement your WCF service in a class library (dll) so you can then host it anywhere you like (IIS, Console App, or Windows Service).
I'd recommend starting from a console application, after your service works as expected, create a Windows Service, add a reference to you library and start the service (WCF) from there (Windows Service)
Edit: I just assumed you meant create a WCF service hosted as a Windows Service, if that's not the case please ignore my answer.
Create your WCF service as normal, create a Windows Service and then use ServiceHost to self-host the WCF service in your Windows Service. See this MSDN page for more information about self-hosting WCF services.

Resources