views:

96

answers:

5

I am confused as to what is the best method for building a web service in .net. Giving the fact that it needs to be highly scalable. Any suggestions?

+3  A: 

If your consumers are all .NET, look at WCF:

http://msdn.microsoft.com/en-us/library/ms731082.aspx

Otherwise, plain old SOAP services are good. Both are scalable.

Ian P
Even if your consumers aren't .NET, look at WCF. You can use regular Http Bindings to expose the WCF services as SOAP Web Services.
Justin Niessner
Good point -- I should have said only use WCF-only features if all of your consumers are .NET.
Ian P
A: 

IIS is designed for scalability, so I'd definitely consider using ASP.NET web services rather than hosting my web service within a windows service using WCF.

Of course, you can host your WCF web service within IIS. Here's an article on how to do this.

This article is a little old, but it details the benefits of hosting your web service in IIS within the Recommendations section:

  • Scalability—It is very easy to scale out a Web service using load-balancing technology such as Windows Network Load Balancing, or hardware devices from vendors such as Cisco and F5. More on this subject to follow.
  • Availability—ASMX Web services can be configured to be highly available using a combination of technologies such as load-balancing combined with the powerful capabilities of the IIS6 infrastructure built into Windows 2003 Server (such as automatic recycling and restarting of failed services).

I guess the point is no matter if you want to use ASP.NET web services or WCF, definitely host it in IIS.

Will
WCF can be hosted in IIS just like plain old ASP.NET web services.
jvenema
Hmmmm... I normally don't think of WCF hosted in IIS. I'll edit to add some details on that. Thanks.
Will
A: 

We use WCF. You can also use Spring.Services very powerfull framework. What stragedy you whant to use service-first or contract-first?

merin
A: 

As per as i know it totally depend on the what kind of web services u want to develop.... if u want to secure,state management and other facilities that can be required for web services ....i prefer WCF (Window communication foundation).

The global acceptance of Web services, which includes standard protocols for application-to-application communication, has changed software development. For example, the functions that Web services now provide include security, distributed transaction coordination, and reliable communication. The benefits of the changes in Web services should be reflected in the tools and technologies that developers use. Windows Communication Foundation (WCF) is designed to offer a manageable approach to distributed computing, broad interoperability, and direct support for service orientation.

for more information about and Problem Example

Gurpreet Singh
A: 

Use WCF.

It allows you to expose a service using multiple protocols and multiple security contexts.

A very good resource for learning WCF is Michele Bustamante's book Learning WCF.

http://www.amazon.com/Learning-Hands-Michele-LeRoux-Bustamante/dp/0596101627 Note: If you do get this book, she has an updated version of Chapter 1 and an appendix on her website.

Her website is also a good source of up-to-date information: http://www.dasblonde.net/default.aspx

Doug Ferguson