-
Using Active Directory in .NET
Last updated: Monday, January 3, 2022
Published in: CODE Magazine: 2013 - November/December
Sometimes your .NET applications need to interact with Microsoft Active Directory (AD) to authenticate users, get a list of users, retrieve groups, or determine which users are within which AD groups. There are a few different approaches you can use to retrieve information from your AD database within your domain.
-
Getting Started with RavenDB
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2012 - March/April
You might have heard some things about NoSQL; how Google and Facebook are using non-relational databases to handle their load. And in most cases, this is where it stopped. NoSQL came about because scaling relational databases is somewhere between extremely hard to impossible.
-
Smashing the Myth: Why You Must Learn F# - Even If You Aren’t Writing Rocket Science Apps
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2012 - March/April
If you are a .NET software developer, you have heard of F#. You may have read an article, seen a talk at a user group, or otherwise heard the buzz. However, if those means of reaching you have failed, at the very least, you have noticed it conspicuously appear in the list of languages you can base a solution on in Visual Studio 2010. If you write code on the .NET Framework, you would have to be living under a rock to have not heard of F#.
-
Getting the Most Out of the Save Pipeline in Visual Studio LightSwitch
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2011 - March/April
Visual Studio LightSwitch applications consist of three tiers: presentation, logic and data. This article discusses the logic tier and its save pipeline. The save pipeline is where developers write business logic that runs as changes are processed on the logic tier and saved to the data storage tier. The save pipeline is automatically generated with every LightSwitch application. Understanding the processing done in the save pipeline is not required to successfully build and deploy applications with LightSwitch, but adding save pipeline business logic provides additional flexibility and control when data is saved.
-
Inside Visual Studio LightSwitch
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2011 - March/April
Microsoft Visual Studio LightSwitch uses a model-centric architecture for defining, building, and executing a 3-tier LightSwitch application.
-
Line-of-Business Applications Consolidation with Silverlight and Windows Communication Foundation
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2011 - March/April
It’s probably one of the most interesting moments to do a post mortem for a Silverlight project. The entire Microsoft ecosystem is boiling around the Silverlight OR HTML 5 debate fueled by the recent PDC and some statements from Microsoft officials. The interesting part about it is that it is a false debate, and like most false debates it will probably lead to nowhere. The simple truth is that Microsoft’s commitment to Silverlight has not changed a bit, and Silverlight is more healthy and strong than ever. And the fact that the same Microsoft places an important bet on HTML 5 too can only make me happy as an architect and a developer. Mostly because it assures me I’ll have my fair share of choices in the future without having to leave the development platform I like. The reality is that neither Silverlight/RIA nor HTML 5 will turn out to be the magic to fly us to the land of perfect web apps and, at least for the foreseeable future, there will always be a need for alternatives. That’s why I think the debate on Silverlight or HTML 5 is nonsense in the Microsoft ecosystem. But I digress… Let me tell you about the latest software project I participated in.
-
The Baker’s Dozen: 13 Productivity Tips for Building OLAP Databases with Microsoft SQL Server 2008 Analysis Services
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2011 - March/April
rewarding experience of writing and speaking is taking a seemingly complex topic and making it more understandable and accessible. In this article, I’ll show how to create and use OLAP databases and cubes using SQL Server Analysis Services 2008 (SSAS 2008). The benefits of OLAP are significant, even monumental - but like most technologies, reaping the benefits means considerable research and effort into leveraging the tools. In the case of OLAP databases, developers need to learn the differences between OLAP databases and relational databases, and how to use the tools that SSAS provides. In this article, I’ll walk through how to create an OLAP database and how to use the tools in Analysis Services to enhance the OLAP database. By the end, you’ll see why businesses and other organizations see the value of OLAP databases. I’ll also briefly cover some of the plans Microsoft has announced for the next generation of OLAP tools.
-
The Razor View Engine
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2011 - March/April
The new view engine for ASP.NET MVC and WebMatrix combines simplicity and functionality to facilitate clean view development. In this article, I’ll dive into the Razor View Engine, the new default view engine for the ASP.NET MVC framework and WebMatrix products. Razor’s main goal is to simplify view development and to improve developer productivity while providing a clean view infrastructure.
-
ASP.NET MVC and the Spark View Engine
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2010 - March/April
Getting friendly with HTML in ASP.NET MVC just got a whole lot easier.In this article, I’ll delve into the Spark View Engine, an alternate view engine for the ASP.NET MVC Framework. Spark’s main goal is to allow HTML to dominate the flow of view development while allowing code to fit in seamlessly.
-
ThoughtWorking: Functional Programming in C# 2.0
Last updated: Thursday, February 21, 2019
Published in: CODE Magazine: 2009 - May/June
Writing software is hard, particularly when the tools you use force you to think at too low a level; it’s time to start thinking about changing the way you write code… by making it easier to write code.Taking on new ways to program doesn’t always mean tossing away your favorite programming language or environment. Sometimes it just means taking a new look at how you’re using your language and trying out a few new ideas. It’s time to take a hard look at your favorite language and see if it’s possible to “fall in love all over again”.
-
From Delegate to Lambda
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2008 - September/October
The key to understanding lambda expressions is understanding delegates. Delegates play a tremendously important role in developing applications for the .NET Framework, especially when using C# or Visual Basic. Events, a special application of delegates, are used all over the framework. And the application and possibilities of delegates has only grown over time. C# 2.0 introduced the concept of anonymous methods and C# 3.0 and VB 9 take anonymous methods to the next level with lambda expressions. This article reviews the evolution of delegates and examines possibilities and syntax of delegates and lambdas in .NET 3.5.
-
Getting Started with Windows Mobile Development
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2008 - July/August
In today’s world of fast food, fast cars, and instant gratification, people expect to be in touch at all times.We have become conditioned to staying in touch with businesses, friends, and families. Because of this desire for instant data, we have the Internet, cell phones, Wi-Fi, MP3 players, and DVD players. As the equipment needed to drive this thirst has become smaller and smaller, we find ourselves looking for portable replacements for our bulky desktop computers.
-
Building WCF Services for Deployment in Transiently Connected Networks
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2008 - January/February
Distributed applications are now prolific in the enterprise and more and more users are relying on network connectivity both on site and on the go so they can remain productive anywhere and at any time. Since network connectivity cannot always be guaranteed, what happens when the network goes down or a network connection is simply unavailable? How can you provide your users with the best connected experience regardless of the state of the network?
-
The Provider Model
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2007 - November/December
In this article you will learn how to isolate yourself from change by taking advantage of the Provider Model.Designing your applications using the Provider Model will allow you to swap components out at runtime, thus allowing you to upgrade them easily.
-
Creating Web Sites with ASP.NET 2.0
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2007 - September/October
“Web application development has come a long way in a fairly short period of time.” A quote like that surely won’t send anyone into shock anytime soon because it’s accepted as fact. From basic, static HTML pages to totally data-driven and data-centric Web applications, the demands on a Web developer are much more complex and demanding than they were just a few years ago. The advent of social networking sites like MySpace, which is written in ASP.NET 2.0, interactive mapping sites, and sites streaming full motion video has required the Web developer to adapt and change with the times. One of the best tools to use to build these types of Web applications is Microsoft’s ASP.NET 2.0. In this article I am going to delve into some of the more interesting features of ASP.NET 2.0 and show you how you can begin using ASP.NET 2.0 on your next Web project.
-
E-mail Attachments on the Fly
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2007 - March/April
Ken Getz Mar/April Finalize column.
-
Everyday Use of Generics
Last updated: Wednesday, February 20, 2019
Published in: CODE Magazine: 2007 - March/April
You may think of generics as a Ferrari that you only take out for special occasions; but they are better compared to your trusty pickup, perfectly suited for everyday use.
-
Microsoft ASP.NET 2.0 Membership API Extended
Last updated: Wednesday, February 20, 2019
Published in: CODE Magazine: 2007 - March/April
Working with big applications requires extending the Microsoft ASP.NET 2.0 Membership API to handle more detailed member records.In this article, I’ll present one of the available techniques used to extend the Microsoft ASP.NET 2.0 Membership API to solve some of the limitations of that API.
-
The Baker’s Dozen: 13 Steps for Building a Lookup Page Using ASP.NET 2.0, SQL 2005, and C# 2.0
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2007 - March/April
Lookup and navigation screens initially seem like no-brainers, when compared to other parts of an application-yet by the time a developer has met all the user requirements and requests, he/she has expended much more time than expected. This issue of The Baker’s Dozen will build a lookup Web page using ASP.NET 2.0, SQL Server 2005, and C# 2.0. The lookup and results page will contain optional lookup criteria and custom paging of the result set. The solution will utilize new language features in SQL 2005 for providing ranking numbers to correlate with custom paging, and new capabilities in .NET generics to pump the results of a stored procedure into a custom collection. Just like Mr. Mayagi taught Daniel the martial arts by doing exercises, the example in this article will demonstrate some common design patterns, such as factory creation patterns, using .NET generics. The article also subtly presents a general methodology for building database Web pages.
-
Chapter 3 - The Anatomy of a Visual Basic Project
Last updated: Wednesday, February 20, 2019
Published in: Book Excerpts
Although you can create lots of kinds of projects both for Windows and the Web with Visual Basic 2010, there is a common set of files for each project. In this chapter you learn which files give the structure to each project and how the files influence the building of an application. You also get an overview of references, namespaces, classes, modules, and Visual Basic keywords.
-
.NET Standard 2.0 - Making Sense of .NET Again
Last updated: Tuesday, April 16, 2019
Published in: The Web View
In this post I look at what .NET Standard is, how it works and what some of the surrounding issues and impacts are for the .NET eco system.
-
ASP.NET 2.0 Web Part Infrastructure
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2006 - November/December
Web applications today do a number of things. They could be a banking site, a content management system, or a news Web site. In spite of the diversity of Web applications available today, it almost always makes sense to break a Web page into smaller, reusable widgets
-
Visual Studio 2005... That Legacy Software!
Last updated: Wednesday, February 20, 2019
Published in: CODE Magazine: 2006 - September/October
Admittedly, I’m excited about the many new technologies coming out of Microsoft. So excited that I can’t even decide what to play with first! I wrote about this in a previous MVP Corner piece for CoDe Magazine.
-
Web Control Enhancements in ASP.NET 2.0
Last updated: Wednesday, February 20, 2019
Published in: CODE Magazine: 2006 - September/October
I’m sure by now you’ve read more than your share of books and articles describing new ASP.NET 2.0 features. Master pages, themes, providers, etc., are all great, but have you read anything regarding custom Web control development and what has changed in 2.0? Well that’s what I’m here to tell you. If you’ve become involved in control development, either through my articles or on your own, I’ll describe some very cool enhancements that you can put to work right away in your controls using ASP.NET 2.0.
-
Dissecting and Putting the Visual Studio 2005 Generated Data Access Layer Into Perspective
Last updated: Wednesday, February 20, 2019
Published in: CODE Magazine: 2006 - July/August
Do more with less code is the slogan of Visual Studio 2005.When it comes to reducing the amount of written code, wizards are definitely a viable option. Visual Studio 2005 has a lot of wizardry in it, especially to generate data access code. Any code that gets silently injected in your project follows a strict logic and a well-known design pattern. A full understanding how Visual Studio 2005 does it puts you on the right track to modify and extend the code to build your made-to-measure data access layer. This article dissects the code behind table adapters and binding source components to unveil patterns and best practices.
-
Achieving Synchronicity: A Listbox Double-Feature
Last updated: Wednesday, February 20, 2019
Published in: CODE Magazine: 2006 - May/June
Building complex Web controls with rich client-interfaces often requires the integration of some client-side JavaScript code with the control’s server-side code. While in some cases this does not have to become too complicated to achieve some pretty nifty results, it can often break the data synchronization between the control’s internal server code and the rendered client HTML code. This becomes a problem when the page posts back. In this article, I will build two very cool Web controls that are vulnerable to this problem and then show you how to fix it.
-
SQL Server 2005 Query Notifications Tell .NET 2.0 Apps When Critical Data Changes
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2006 - May/June
One of the classic problems with database applications is refreshing stale data. Imagine a typical e-commerce site with products and categories. A vendor’s product list most likely does not change very often and their category list changes even less frequently. However, those same lists must be queried from the database over and over again every time a user browses to that Web site. This is an annoyingly inefficient use of resources and developers and architects have been stuck playing cat-and-mouse trying to reduce the waste.
-
System.Transactions and ADO.NET 2.0
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2006 - May/June
Data is the blood in your system; it sits in its comfortable home of a database, and camps out in the tent of XML, but it deserves to be worked with in a reliable and consistent manner.But why should only data-related operations be reliable? Shouldn’t you want to write reliable code for your other operations? The introduction of System.Transactions in .NET 2.0 brings a paradigm shift of how you will write reliable transactional code on the Windows platform. This article dives deep in the depths of how System.Transactions works, and how you can use it to your advantage. You will also see how you can leverage existing System.Transactions integration within ADO.NET, and why you need to really understand what is under the magic carpet.
-
Object Binding Tips and Tricks
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2006 - March/April
Gaining the full potential of object binding requires more than just dragging and dropping your properties onto forms. In this article I’ll present a few tricks you need to know to get the most from your object binding.
-
Security in the CLR World Inside SQL Server
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2006 - March/April
One of the major benefits of writing .NET code to run in the Common Language Runtime (CLR) hosted in any environment is code access security (CAS).CAS provides a code-based-rather than user-based-authorization scheme to prevent various kinds of luring and other code attacks. But how does that security scheme coexist with SQL Server 2005’s own, newly enhanced security features? By default your .NET code is reasonably secure, but it’s all too easy for the two security schemes to butt heads and cause you grief. In this article I’ll look briefly at the concept behind CAS and a few new security features in SQL Server 2005, then explore how to make the two systems work for you instead of against you as you take advantage of these advanced programming features in SQL Server.
-
ClickOnce: Bringing Ease and Reliability to Smart Client Deployment
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2006 - January/February
Who said client deployment has to be difficult? Many developers would love to leverage the rich UI, high performance, and offline capability offered by smart client applications; however, they’ve been turned off by the high TCO caused by client deployment headaches. The advent of ClickOnce client deployment technology in the .NET Framework 2.0 heralds a new era where client deployment takes on the ease and reliability of Web deployment.
-
Multimedia Control
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2006 - January/February
If you've ever tried to find classes in the .NET Framework that allow you to play audio and video, you may have noticed the gaping hole where this functionality should be.If you think Microsoft has finally gotten around to fixing this glaring omission in version 2 of the framework, you’re only partially correct. While some basic audio capabilities will be provided (as described later in this article,) they still leave a lot to be desired. On the other hand, the free MediaPlayer component provided with this article demonstrates a more feature-rich solution to your multimedia needs-and it’s compatible with all versions of the .NET Framework.
-
New Features In Visual Studio 2005 Windows Forms
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2006 - January/February
“Don’t do it! Don’t do it!” the little voice in my head shouted as I contemplated using the worn out cliché “Good things come to those who wait” to describe the experience of designing Windows applications with Visual Studio 2005.However, that cliché accurately communicates the idea that building Windows Forms applications in Visual Studio 2005 is better, makes you more productive, and provides you with more fun than doing the same in Visual Studio 2003, not to mention VB6!
-
Top-Ten Annotations and Remarks about the Wonderful and Powerful New Set of Features in ASP.NET 2.0
Last updated: Wednesday, February 20, 2019
Published in: CODE Magazine: 2006 - January/February
You’ll still write a good deal of code in ASP.NET 2.0.Don’t completely trust those who say that ASP.NET 2.0 cuts 70% of the amount of code you’re called to write. You’ll end up writing more or less the same quantity of code, but you’ll write code of different quality. You’ll have more components and less boilerplate code to tie together pages and controls. Features like the provider model, data source controls, and master pages make coding easier and equally effective. But since there’s no magic behind, you have to learn the implications of each feature you employ. In the end, ASP.NET 2.0 comes with code behind, not magic behind.
-
.Finalize(): Are We There Yet?
Last updated: Wednesday, February 20, 2019
Published in: CODE Magazine: 2005 - May/June
Ken Getz - May/June 2005 Finalize column
-
Implications and Repercussions of Partial Classes in the .NET Framework 2.0
Last updated: Wednesday, February 20, 2019
Published in: CODE Magazine: 2005 - March/April
Partial classes are a hot new feature of the next .NET compilers.Specifically designed to overcome the brittleness of tool-generated code, partial classes are a source-level, assembly-limited, non-object-oriented way to extend the behavior of a class. A number of advantages derive from intensive use of partial classes; for example, you can have multiple teams at work on the same component at the same time. In addition, you have a neat and elegant incremental way to add functionality to a class.
-
What's New in the Visual Studio 2005 Toolbox for Windows Applications?
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2005 - January/February
All developers always welcome new controls and components.When a big new development tool ships (say, one as big as Visual Studio 2005) many developers look at what's missing in the toolbox even before they take a thoughtful look at what's in. Frankly, the toolbox for Windows Forms applications was already pretty rich in Visual Studio .NET 2003, but it will be even richer when the next version ships. In this article, I'll take you on a whistle-stop tour of the new controls slated for Windows Forms 2.0 to make writing code more productive and pleasant than ever.
-
A Look Under the Hood of Windows Forms Data Binding
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2004 - September/October
Many developers have a dream: easy and efficient data binding.To be really quick and profitable, RAD (rapid application development) tools and techniques must be strong in data binding. They must provide a programming interface that is both easy to use and effective. Easy design-time composition of user interfaces; effective support of complex scenarios of interrelated data, dependencies, and filtering. In Windows Forms, the data binding machinery is highly sophisticated and designed to meet common needs of former client/server applications, now migrating to the more modern .NET multi-tier design. This article reviews common Windows Forms data binding techniques and provides answers and explanations.
-
Data Validation Using .NET and External Metadata
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2004 - September/October
Using .NET reflection and external metadata makes it easy to add data validation to your objects.Nearly every application that collects data, whether from a Windows- or Web-based form or from a file, needs to validate that the data is in the correct format.
-
Drag-Once Databinding
Last updated: Wednesday, February 20, 2019
Published in: CODE Magazine: 2004 - September/October
Using the new Data Sources Window in Visual Studio 2005, developers can now drag columns of their typed DataSets or properties of their own business objects directly to their form. Visual Studio 2005 will create, name, and label controls for each bound property. For those that prefer to lay out the forms with the toolbox, developers can use "Connect the Dots DataBinding" to drag and drop from the Data Sources Window onto their existing controls.
-
'For-Each' Of My Own
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2004 - September/October
The .NET Framework provides many new collection classes that you can iterate (for-each) through.But did you know that you can also iterate through values in any of your classes, not just those that use or inherit from collections?
-
Instrumenting Applications with .NET Tracing
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2004 - September/October
Application instrumentation gives you the ability to perform runtime diagnosis of enterprise application state, which is critical to mission success.To help with instrumentation and logging, .NET ships with tracing types in the System.Diagnostics namespace. Using these types, you have the ability to log information to multiple output streams for diagnosis of application runtime behavior. Information produced by instrumentation and tracing types enable you to examine the runtime state of an application and fix problems that would be otherwise expensive and painful to solve.
-
Oh My!! - A Look at the My Namespace in Visual Basic 2005
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2004 - September/October
Productivity is one of the major goals of Visual Basic 2005 and with "My" Microsoft may just have hit a home run.Although Visual Basic .NET is just as powerful as C# for building business applications, it did not get the initial push that C# did back at PDC 2000 when Microsoft unveiled .NET. This was not meant to slight Visual Basic and Visual Basic developers, but rather represented the state of the Visual Basic .NET language which was not as far along in the development process as C#. Opponents to the Basic syntax took this and ran with it. Microsoft has tried to attack this misconception but has also caused some of the problem, initially by pushing .NET for Web services development so hard that many developers and managers incorrectly got idea that .NET was primarily for Web services. With Visual Basic 2005 the power of the .NET Framework is fully exposed and the true power of Visual Basic is once again starting to take form and that power is productivity. Whereas C# is about language first and foremost Visual Basic is about language and tools to make the development process faster.
-
Visualize Your Code with the Class Designer
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2004 - September/October
The Class Designer feature of Visual Studio 2005 allows you to visually manipulate your classes.A picture is worth a thousand words, as the saying goes. The new Visual Studio 2005 (Whidbey) Class Designer provides a visual design environment that allows you to visualize and manipulate your classes. Being able to see your classes and work with them using a visual designer can significantly increase your productivity.
-
Shaped .NET Windows Forms
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2003 - January/February, Markus Egger Talks Tech
Since the earliest versions of the Windows operating system, all Windows have been rectangular.However, the number of applications that break out of this boring mold is rising. Even Microsoft, the king of rectangularity, is starting to create applications that use shaped windows, such as Media Player. Unfortunately, creating shaped forms has always been quite tricky. Until now that is! The .NET Framework and the Windows Forms package in particular make it easy to produce forms that have rather sophisticated shapes.
-
The Enterprise Instrumentation Framework
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2003 - November/December
We've all faced those irritable questions about our applications running in production. Typically a system administrator will spring one on you on a Friday afternoon just when you're finishing out the week with a game of foosball. Why did this request fail? What is causing so many disk IO spikes? What requests are failing as a result of this error? Why is the application running so slowly? Why are all the resources being gobbled up on the Web server? These questions often make us stare blankly for a while, mumble something, and then scramble back to our cave (or server room) for hours on end trying to provide answers,
-
Remote Object Models In .NET
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2003 - January/February
Modern applications are no longer isolated, stand-alone applications, limited to a single process or machine. Distributed applications allow you to put components in close proximity to the resources they use, allow multiple users to access the application, enable scalability and throughput, and increase overall availability and fault isolation. Component-oriented programming is especially geared towards distribution because it is all about breaking the application into a set of interacting components, which you can then distribute to different locations. .NET has a vast infrastructure supporting distributed applications and remote calls. This article focuses on just a single aspect of .NET remoting: the different object activation models available to a distributed application.
-
Introduction to Crystal Reports .NET
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2002 - July/August
Crystal Reports is officially a member of the Visual Studio .NET product.It is included in all major editions and ships in all languages available with Visual Studio .NET. Crystal Reports .NET provides developers with the fastest, most productive way to create and integrate presentation-quality, interactive reports that scale to meet the demands of end users. This article introduces you to Crystal Reports .NET and shows you how to create reports and view them in either a Windows form or a Web form. I will also show you how to publish a report as a Web service and consume the service in a Web form.