ASP.NET
  Home arrow ASP.NET arrow Developing Your First Silverlight Applicat...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Developing Your First Silverlight Application Using Visual Studio 2008
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 14
    2007-11-07

    Table of Contents:
  • Developing Your First Silverlight Application Using Visual Studio 2008
  • Creating an ASP.NET 3.5 Web Service using Visual Studio 2008 beta: source code
  • Adding a Silverlight Project to the Visual Studio 2008 solution
  • Adding a Silverlight Project to Visual Studio 2008 solution: hosting in IIS
  • Consuming the ASP.NET Web Service from the Silverlight application using the Visual Studio 2008 solution

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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).

    • Provide the name “SilverlightSampleWithWebService” and click OK to create the blank solution.


    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:


    • Right click on “Solution Explorer,” click on “Add” and select “Add Project” (as shown in Fig 2).

    • 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.

    • Rename “Service1.asmx” to “ProductService.asmx.”

    • Right click on “ProductService.asmx” and select “View Markup” (Fig 4).

    • Modify the script so that it looks like the following:


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

    • Go to Project || NorthwindService Properties (Fig 5).

    • Within the project properties, select the “Web” tab, select “Use IIS Web Server” and click on “Create Virtual Directory” (as shown in Fig 6).


    More ASP.NET Articles
    More By Jagadish Chaterjee


       · Hello guys,This is my first contribution on Silverlight technologies. This...
       · Hi Jag,I've been searching for days for something like you've written here. This...
     

    ASP.NET ARTICLES

    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek