ebb
ebb

Reputation: 9397

WCF: Web Service or not?

I'm at the moment creating an ASP.NET web app which should call a WCF Service... The WCF Service have 2 methods:

Bitmap TakeScreenDump(string websiteUrl, int width, int height);
Bitmap GenerateThumbNail(Bitmap source, int width, int height);

The purpose of my ASP.NET web app is to let a user request a screenshot for a specific website, which the web app will hand over to the WCF Service.

Now is my question: Should I create the WCF Service as a Web service (http binding) ? or should I create it as a Console service (net.tcp)? My WCF Service wont be used by anyone else than me.

Whats the advantages/disadvantages of those two in this case?

Upvotes: 2

Views: 377

Answers (1)

John Saunders
John Saunders

Reputation: 161831

It doesn't matter. The service code will be exactly the same.

It's one of the most important things about WCF that the service is separate from the binding. If you think you might want to use more than one binding, then create the service as a "WCF Service Library" project. Then you can host it in a Console Application, Windows Service, or whatever, using whichever binding you like.

In fact, there's no reason you can't do both. You can host it in a Console application using one of the HTTP bindings if you like.

Upvotes: 4

Related Questions