Windows Activation Service on Windows 2003 - c#

I know (Windows Activation Service) WAS is advertised as part of Windows 2008/Vista/7 but since it appears under .NET 3.5 framework components in Control Panel Windows Components, I was wondering if anyone knows/has managed to run in under Windows 2003 as well.
I'm trying to host a WCF server in WAS under Windows 2003 (written in .NET C#)
Alternatively, does anyone know of any good open source application servers out there that can be used to host .NET servers? (TomCat for .NET?!)

WAS is a part of IIS7, which is available on Vista and Win Server 2008 and up only.
On Win Server 2003, you can either host your WCF service in IIS - which limits you to just http (basicHttp or wsHttp), or - my preferred way - you can host your WCF service yourself.
Typically, you would host your WCF service in a console app for testing/debugging purposes, and then put it inside a Windows NT Service for production - this runs around the clock, with no one logged in, and it supports ALL the WCF bindings (not just http, but also Net.TCP, NetNamedPipe, MSMQ and so on).
Marc

You can always roll your own WCF host. I've used this concept as an example.
http://www.codeproject.com/KB/WCF/generic_wcf_host.aspx

You can host a WCF service in IIS on Windows 2003, if you use basichttpbinding or wshttpbinding.
You could also host a WCF service as a windows service on windows 2003.
WAS is not available on Windows 2003.

Related

How to host WCF web service over the internet?

I work as a C# developer and we have many .NET web services that we use. I am doing some at home development and want to do something similar. I have a database (SQL Server 2012) on a home PC running Windows Server 2012 with IIS 8 installed. I have created a WCF web service in Visual Studio (C#) and it compiles to a .svc file. This just facilitates data exchange between my SQL Server Database and the application I am writing.
I am unfamiliar with how to host the WCF service so that the Windows Form application that I am writing that will be installed on many non-local machines can access it. I figured a WCF service would be the best choice for accessing my database for the WinForm application over the internet.
I also have a domain with a basic Windows package on 1&1.com leftover from a previous project if that helps.
Can anyone give me some steps to get my WCF service hosted so it can be accessed over the internet? Please ask if I forgot to list any needed information.
Two common ways are to host your WCF service from IIS, or to self host it yourself from within a simple wrapper program that acts as a TCP server.
See http://msdn.microsoft.com/en-us/library/ee939285.aspx
The simplest way is to setup IIS and just publish your services like you would a web application; your service will exposed over http/https. Use an appropriate binding like wsHttpBinding or BasicHttpBinding depending on your security needs. Read up to understand the different bindings and what each does and does not support.
In order to host WCF via IIS, at least on Windows Server 2003 and 2008, make sure you follow the install steps, such as adding .NET 3.5.1 / WCF options on older platforms. I believe Server 2012 includes it within .NET 4 framework, but I haven't yet done it on 2012.
Google "WCF hosting IIS" for steps / setup guides.
There are also hosting providers that specifically provide WCF hosting solutions, though I'm pretty sure your current provider, since it supports IIS, should do fine.

Launching Windows Form on IIS - any workaround?

I faced problem with IIS web application. There is some RTF processing needed on server side and this can be done with windows control. This control requires to be created and shown in order to perform operations (RTF stuff).
I would like to expose web-service from IIS that could launch windows form on Windows Server (the one that is hosting IIS), perform some work and return data to web-service. Problem is that IIS does not allow to launch windows forms.
Requirement is to host whole app on IIS. Windows Service installed separately is not an option here. I tried deploying WCF service on IIS that that didn't worked too.

Developing for named pipes on XP

I have an application that is moving over from WCF Http to named pipes since everything is on the same machine. Those in charge have decided not to reference the DLLs directly, so that's not an alternative. I'm okay moving over to a tcp connection instead, though I don't know that it gives us any direct performance benefits over http on the same machine. The production host is going to be a IIS 7 server, not a WAS or other service. My machine has IIS 5.1, Cassini, and IIS Express.
I've tried the following:
Virtual Box running windows 7 on my XP machine. The installer craps out.
Named Pipes on Cassini, not supported.
Named Pipes on IIS Express, not supported.
Googling the hell out of the solution, nothing useful found.
What is the best/recommended way to develop WCF NetNamedPipes on XP that does not have IIS 7?
On XP, the WCF binding to named pipes works well for a service which is custom-hosted in a Windows Service process. But if you don't want to build a custom host you are out of luck: the only protocol supported for hosting in IIS5/6 is HTTP.
WCF service hosting in IIS for protocols other than HTTP depends on WAS, which requires IIS7. This constraint applies equally to the TCP binding, so that is not a workaround as you suggest.
It sounds as if your application is intended to be IIS-hosted in production. If this is a given, I think you have no alternative but to change to a new development platform which supports the target environment.

Porting existing console application to Windows Azure

I have some console applications that communicate using WCF over TCP. Is it possible/easy to port a console application to Windows Azure, or must the application be hosted in IIS/asp .net?
Since you do not really log into a Windows Azure machine and see the screen as you could do with a local server in your network I guess you should only develop server side components or IIS Hosted services and web applications exactly as you said.
you could get the Windows Azure SDK: Windows Azure SDK and explorer the available templates and alternatives locally in your machine.
A console application can be started from a role - web or worker - and communication to that app can be via the InputEndpoint (HTTP, HTTPS or TCP).
I worked on a project that spawned a console app from a worker role, the role fed workloads read from storage queues direct to a WCF service hosted in the console application - using tcp.
I found that you can use startup tasks in the config file for Azure. That works.

What are the various methods of hosting a WCF service?

What are the various methods of hosting a WCF service?
There are four common ways, all of which are outlined nicely on MSDN: Hosting WCF Services.
Hosting in IIS.
Hosting in WAS.
Hosting in a Windows service.
Hosting in an application (aka "self-hosting").
For right now, everything that's been said is correct.
Hosting in IIS6 only support HTTP protocols and "on-demand" activation
Hosting in IIS7 / WAS (only on Vista / Server 2008 and up) supports all protocols and "on-demand" activation
Self-Hosting in a console app or Windows service supports all protocols, but doesn't support on-demand activation (e.g. your service must be up and running all the time, it cannot be magically activated when a request comes in)
What's not been mentioned is what the .NET 4.0 wave later this year (2009) will offer - there's a new add-on server component called Dublin which is said to offer a rich and managed hosting environment for both WCF services as well as WF workflows.
Marc
You can host it in an IIS application or in your own executable. Typically the executable would be a windows service application.
Any Windows process can be used to host a WCF service. There are practically no restrictions on this - a process can host multiple WCF services and the same WCF service type can be hosted across multiple processes simultaneously.
From Juval Lowy's book Programming WCF Services, hosting can be provided by
Microsoft Internet Information Server (IIS)
Self-hosting within a Windows Forms application, Windows service, or console app
Windows Activation Service (WAS)

Categories