Developing Your First Silverlight Application Using Visual Studio 2008
(Page 1 of 5 )
In this article, we will focus on developing a Silverlight application which consumes an ASP.NET web service. This article can serve as an excellent walk through resource for beginners who are trying to develop dynamic Silverlight applications.
A
downloadable zip file is available for this article.
WPF, WCF, WWF, CardSpaces and Silverlight are the next generation components from Microsoft which revolutionize the current .NET Framework with great new and innovative architectures covering all tiers. I will not look into details of architectures of these new components as Microsoft has already added great content on its MSDN.
If you have not configured IIS after installing Visual Studio 2008 beta 2, it is highly advised to run the following (for proper mappings and automated IIS configuration):
ServiceModelReg.exe /i /x
Once Visual Studio 2008 beta 2 is installed, you need to install Microsoft Silverlight 1.1 SDK (Alpha) (available at this Microsoft site) and Microsoft Silverlight Tools for Visual Studio 2008 beta (Alpha) (available at this Microsoft Silverlight site).
The entire source code for this article is available in the form of a downloadable zip file. The solution was developed using Microsoft Visual Studio 2008 Beta 2 and Microsoft Silverlight 1.1 Alpha on Microsoft Windows Server 2003 Enterprise Edition with Microsoft SQL Server 2005 Enterprise Edition. I didn’t really test it in any other environment. I request that you post in the discussion area if you have any problems in execution.
Creating an ASP.NET 3.5 Web Service using Visual Studio 2008 beta
As I would like to have the whole source code in a single Visual Studio 2008 solution, we need to start with creating a blank Visual Studio 2008 solution (and add projects) as follows:
Open Microsoft Visual Studio 2008 Beta 2.
Go to File || New Project.
In the “New Project” dialog box, select the “Blank Solution” template available in “Visual Studio Solutions” of “Other Project types” (as shown in Fig 1).

Once the blank solution is created, we need to proceed with the ASP.NET web service. The following are the steps you need to take to create the ASP.NET web service:

In the “New Project” dialog box, open “Visual Basic” project types and select “Web.” The respective templates for “Web” will be shown on the right side.
Select the “ASP.NET Web Service Application” template.
Fill in the “Name” as “NorthwindService.”
Make sure that “.NET Framework 3.5” is selected at the top.
Once everything looks like the following screen shot (Fig 3), click OK.


<%@ WebService Language="VB" CodeBehind="ProductService.asmx.vb" Class="NorthwindService.ProductService" %>


Next: Creating an ASP.NET 3.5 Web Service using Visual Studio 2008 beta: source code >>
More ASP.NET Articles
More By Jagadish Chaterjee