Best Practices for Building Web Services with VS.NET

1 / 28
About This Presentation
Title:

Best Practices for Building Web Services with VS.NET

Description:

Microsoft Certified Technical Education Centers (CTECs) ... MSDN Magazine. MSDN News. MSDN Subscriptions. THE way to get Visual Studio .NET. Visual Studio .NET ... –

Number of Views:62
Avg rating:3.0/5.0
Slides: 29
Provided by: downloadM
Category:

less

Transcript and Presenter's Notes

Title: Best Practices for Building Web Services with VS.NET


1
Best Practices for Building Web Services with
Visual Studio .NET
Sanguan Thammarojsakul Microsoft MVP -
.NET   Department of Computer Science, Faculty of
Science and Technology Assumption University of
Thailand
2
What we will cover
  • ASP .NET Web Services
  • ACT
  • SOAP Security
  • Global XML Web Services Architecture (GXA)
  • scalability, interoperability, reliability, and
    security

3
Session Prerequisites
  • Familiarity with .NET Programming
  • Know Visual Basic .NET
  • Familiar with ASP .NET

Level 300
4
Agenda
  • Architecture of Web Services
  • Testing Web Services
  • Securing SOAP
  • Web Services in the Enterprise

5
Architecture of Web ServicesOpen Middle Tier
Implementation
  • What is a Web Service?
  • A website without the user interface
  • A method for defining interfaces above the
    transport protocol
  • XML Interoperability
  • Web Services support 4 protocols
  • Http Get - Interoperable
  • Http Post - Interoperable
  • Http SOAP - Interoperable
  • Import as a DLL for an object interface - .NET

6
Architecture of Web Services Implementing XML
Services
  • ltWebService(Namespace "http//msdn.microsoft.co
    m/DevT1-46")gt
  • Declares the interface, indicates that the class
    defined is a web service
  • Inherits System.Web.Services.WebService
  • Parent class for all web services in .NET
  • ltWebMethod()gt
  • Each method which is exposed as part of the
    service.
  • Return values can be supported in any request
    format but Output parameters are only supported
    in SOAP

7
Architecture of Web ServicesService Discovery
  • UDDI Universal Description, Discovery and
    Integration
  • Design time specification for the discovery of
    services and communication of their interface
  • Does not define the service implementation and
    protocol details.
  • Complemented by WSDL
  • Managed by an industry-wide consortium for
    details visit http//uddi.org

8
Agenda
  • Architecture of Web Services
  • Testing Web Services
  • Securing SOAP
  • Web Services in the Enterprise

9
Testing Web ServicesDefault ASMX Pages
  • Visual Studio creates a default test frame for
    each web service
  • Accessible from the ltservicegt.asmx page
  • The automated page only supports and test the
    http Get protocol
  • Can act as the starting point for both functional
    and performance testing

10
Testing Web Services Performance Testing
  • Application Center Test
  • Allows for the automated execution of web based
    resources using VB Scripts
  • Two versions
  • Full version in Application Center Server
  • Developer Version in Visual Studio .NET
    Enterprise Architect edition
  • Produces XML based results
  • Supports Side by Side Comparison
  • Integrated with Performance Counters for
    collection of Transaction Cost Analysis data

11
Testing Web Services Transaction Cost Analysis
  • Transaction Cost Analysis Equation
  • Cycles N S avg (Pt) / avg(Rps)
  • Where
  • N Number of Processors
  • S Speed of Processors
  • Pt System Total Processor Time
  • Rps ACT ASP Requests per second
  • Cycles Average CPU cycles

12
Demonstration 1Transaction Calculator Service
Run the T_Calc ServiceCreate a Simple ACT
TestRun a Custom ACT Test
13
Agenda
  • Architecture of Web Services
  • Testing Web Services
  • Securing SOAP
  • Web Services in the Enterprise

14
Securing SOAPAuthentication SSL
  • Authentication is supported
  • Selected from Internet Services Manager
  • NTLM and Basic authentication are available
  • Use New Net.NetworkCredential()
  • Authentication does not protect data
  • To protect data can use SSL
  • From Browser preface call with https//
  • From Code modify ltservicegt.url property to
    include https//
  • Https is transport specific

15
Securing SOAPEncoding Encryption
  • UTF-8 Encoding
  • Can be used for the contents of a SOAP Message
  • Allows for the inclusion of binary data
  • Encryption
  • .NET supports several forms of encryption
  • Can be used to protect data without relying on
    transport protocol
  • Requires key synchronization

16
Demonstration 2Authentication/Security Create
a service requiring AuthenticationCreate a
Windows Form ClientCall a Service that Encodes
response Data
17
Agenda
  • Architecture of Web Services
  • Testing Web Services
  • Securing SOAP
  • Web Services in the Enterprise

18
Web Services in the EnterpriseMessaging
Infrastructure
  • Global XML Services Architecture (GXA)
  • GXA has four key specifications to date
  • WS-Security
  • Credential exchange, message integrity, and
    message confidentiality
  • WS-License
  • Encoding for common license formats

19
Web Services in the EnterpriseMessaging
Infrastructure
  • WS-Referral
  • Partition URL namespaces between nodes
  • WS-Routing
  • Route messages across intermediate SOAP nodes
  • GXA is still under development as an industry
    wide standard.
  • Other specifications may be added as the standard
    develops.

20
Web Services in the EnterpriseSOAP Extensions
  • SOAP Extensions
  • Added to the SOAP envelope
  • Provide a generic means of implementing
    additional capabilities.
  • .NET SoapExtension
  • System.Web.Services.Protocols.SoapExtension
  • Will be the core of implementing GXA

21
Session Summary
  • Use Web Services as Middleware
  • Use ACT for lifecycle testing support
  • Use .NETs built in mechanisms for securing web
    services
  • SOAP Extensions

22
For More Information
  • MSDN Web site at
  • http//msdn.microsoft.com/webservices
  • WebServices Specifications
  • http//msdn.microsoft.com/library/default.asp?url
    /library/en-us/dnsrvspec/html/wsspecsover.asp
  • Reliable XML Web Services
  • http//msdn.microsoft.com/library/default.asp?url
    /library/en-us/dnexxml/html/xml11192001.asp
  • Using SOAP Extensions for Encryption
  • http//msdn.microsoft.com/library/default.asp?url
    /library/en-us/dnaspnet/html/asp09272001.asp

23
For More Information
  • Transaction Cost Analysis
  • http//www.microsoft.com/applicationcenter/techinf
    o/planning/2000/wp_tca.asp
  • Global XML Web Services Architecture
  • http//www.gotdotnet.com/team/XMLwebservices/gxa_o
    verview.aspx
  • GotDotNet.com

24
MS PressEssential Resources for Developers
To find the latest developer related titles
visit www.microsoft.com/mspress
25
TrainingTraining Resources for Developers
  • Developing XML Web Services Using Visual C
  • Course 2524
  • Building ASP.NET Applications
  • Course 2063
  • Programming with Microsoft Visual Basic .NET
  • Course 2373

To locate a training provider for this course,
please access mcspreferral.microsoft.com/default.a
sp Microsoft Certified Technical Education
Centers (CTECs) are Microsofts premier partners
for training services
26
MSDNEssential Resources for Developers
Subscription Services
Library, OS, Professional, Enterprise, Universal
Delivered via CD-ROM, DVD, Web
OnlineInformation
MSDN Online, MSDN Flash
Training Events
MSDN Training, Tech-Ed, PDC, Developer Days,
MSDN/Onsite Events
Print Publications
MSDN Magazine MSDN News
MembershipPrograms
MSDN User Groups
27
MSDN Subscriptions THE way to get Visual Studio
.NET
MSDN Subscriptions
Visual Studio .NET
  • Enterprise Architect
  • Software and data modeling
  • Enterprise templates
  • Architectural guidance

MSDN Universal2799 new2299 renewal/upgrade
  • Enterprise Developer
  • Enterprise lifecycle tools
  • Team development support
  • Core .NET Enterprise Servers

MSDN Enterprise2199 new1599 renewal/upgrade
NEW
  • Professional
  • Tools to build applications and XML Web services
    for Windows and the Web

MSDN Professional1199 new899 renewal/upgrade
28
Where Can I Get MSDN?
  • Visit MSDN Online atmsdn.microsoft.com
  • Register for the MSDN Flash Email Newsletter at
  • msdn.microsoft.com/flash
  • Become an MSDN CD Subscriber at
    msdn.microsoft.com/subscriptions
  • MSDN online seminars
  • msdn.mircosoft.com/training/seminars
  • Attend More MSDN Events

29
Session Credits
  • Author Bill Sheldon
  • Producer/Editor Field Content Team
  • Reviewers
  • Field Content Council
Write a Comment
User Comments (0)
About PowerShow.com