Title: WinForms Remote Data Access
Tags: winforms;visual-studio-2010;data-access-layer
Question: VS2010: What is the best way to access a remote database over the internet from a WinForms application? By that I don't mean talking to the database (SQL Server) directly, but rather through a service. Best if I could use http as a protocol to avoid firewall issues.

Here is the accepted answer: Would recommend that you look at WCF
If you have control over both ends of the connection, you then can change protocol etc through configuration, but yes, http:80 is usually the easiest way to adhere to firewall policies.

Here is another answer: If you wish to keep this simple and your needs are limited you could always use a typed dataset that you pass over WCF (or .Net Remoting).   However you will quickly hit problems if your app gets more complex or you have lots of data.
SqlServer will exposed stored procs over soap, this may work well if your applications uses a few stored procs that are not too chatty.
Exposing your data with WCF Data Services is an option if you want simple CRAD operations.
Otherwise you will have to define all the methods you need on WCF interfaces.
If you are not tied to WinForm, look at WCF RIA Services with Silverlight as this will do a lot of the hard work for you with most CRAD type applications.  But you will need to learn Silverlight.
The problem is there is no simple and
easy solution to “presenting the
internet is not in the way” and moving
to a 3 tier application will always
make your code more complex.  A 3 tier
architecture can be great for more
complex and demanding applications,
but is often over kill.
Also consider writing a 2 tier WinForms application and using Terminal Services to expose it to your clients over the internet.   This is often the cheapest solution and tends to give the least pain with system admin.   However a lot of programmers think it is “cheating” for some reason.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 2.5', 'CreationDate': '2010:00:09/08/10', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<winforms><visual-studio-2010><data-access-layer>', 'Title': 'WinForms Remote Data Access', 'ViewCount': 369, 'id': 3665590, 'user_AboutMe': None, 'user_AccountId': 197848.0, 'user_DisplayName': '29Dimensions', 'user_Reputation': 23.0, 'user_Views': 3.0, 'user_id': 442165.0}}