Microsoft Windows Communication Foundation Step by Step
Microsoft Windows Communication Foundation Step by Step
John Sharp
content∙master
Microsoft
PUBLISHED BY
Microsoft Press
A Division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-6399
© 2007 by John Sharp
ISBN 0735623368
ISBN 9780735623361
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher.
Library of Congress Control Number: 2006939802
1 2 3 4 5 6 7 8 9 QWE 2 1 0 9 8 7
Distributed in Canada by H.B. Fenn and Company Ltd.
A CIP catalogue record for this book is available from the British Library.
Microsoft Press books are available through booksellers and distributors worldwide. For further information about international editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly at fax (425) 936-7329. Visit our Web site at www.microsoft.com/mspress. Send comments to mspinput@microsoft.com.
Microsoft, Microsoft Press, Active Directory, Internet Explorer, MSDN, SQL Server, Visual Basic, Visual C#, Visual C++, Visual Studio, Windows, Windows CardSpace, Windows Server, Windows Vista, and WinFX are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Other product and company names mentioned herein may be the trademarks of their respective owners.
The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred.
This book expresses the author’s views and opinions. The information contained in this book is provided without any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers, or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly by this book.
Acquisitions Editor: Ben Ryan
Project Editor: Valerie Woolley
Editorial and Production: Custom Editorial Productions, Inc.
Technical Reviewer: Jon Flanders; Technical review services provided by Content Master, a member of CM Group, Ltd.
Body Part No. X13-24119
About the Author
John Sharp
John Sharp is a Principal Technologist at Content Master (http://www.contentmaster.com), part of CM Group Ltd, a technical authoring company in the United Kingdom. He researches and develops technical content for training courses, seminars, and white papers. John is deeply involved with .NET Framework application development and interoperability. He has written papers and courses, built tutorials, and delivered conference presentations covering distributed systems and Web services, application migration and interoperability between Windows/.NET Framework and UNIX/Linux/Java, as well as development using the C# and J# languages. John has also authored Microsoft Visual C# Step by Step, and Microsoft Visual J# Core Reference, both published by Microsoft Press.
Acknowledgments
Before I started work on this book, my wife used to think I was slightly mad. After my usual bout of late nights, gallons of hot sweet tea, and the occasional burst of interesting vocabulary (I had to initially explain that the term “WCF” is not an expletive, no matter how loudly I shout it), she has now reformed her opinion of me and knows I am quite insane. That said, I wouldn’t swap the experience of writing books for anything in my professional life–there are much harder ways to earn a living, and I thank all at Content Master for allowing me to spend a significant amount of my time doing it.
Writing a book is a team effort. However, although you don’t actually meet many people face to face, you work closely with so many people electronically that you feel they are old friends. Certainly the team of professionals I have had the pleasure of working with at Microsoft Press has been superb and I would like to thank them all, especially editor Valerie Woolley, who has guided me through the authoring process and put up with me making change after change to the titles of chapters, and Julie Hotchkiss, who worked patiently behind the scenes liasing with the editing staff and the technical reviewers. I must also make special mention of Jon Flanders, who has done sterling work reviewing each chapter, setting me straight when I did not make sense or when I was just plain wrong!
As ever, I must acknowledge the support given to me by my family: to Diana, who supplied the gallons of tea and now understands what WCF is even if she didn’t want to know before; to James, who suddenly grew taller than me while I was writing Chapter 4; and to Francesca, who thinks I am an unfashionably dressed, sad geek.
And finally, “Up the Gills!” (If they don’t get promoted soon I shall have to switch my allegiance to Forest Green Rovers.)
John Sharp
Microsoft Visual C# 2008 Step by Step.pdf
Introduction
Microsoft Visual C# is a powerful but simple language aimed primarily at developers creating
applications by using the Microsoft .NET Framework. It inherits many of the best features of
C++ and Microsoft Visual Basic but few of the inconsistencies and anachronisms, resulting in
a cleaner and more logical language. With the advent of C# 2.0 in 2005, several important
new features were added to the language, including generics, iterators, and anonymous
methods. C# 3.0, available as part of Microsoft Visual Studio 2008, adds further features,
such as extension methods, lambda expressions, and, most famously of all, the Language
Integrated Query facility, or LINQ. The development environment provided by Visual Studio
2008 makes these powerful features easy to use, and the many new wizards and enhance-
ments included in Visual Studio 2008 can greatly improve your productivity as a developer.
Who This Book Is For
The aim of this book is to teach you the fundamentals of programming with C# by using
Visual Studio 2008 and the .NET Framework version 3.5. You will learn the features of the C#
language, and then use them to build applications running on the Microsoft Windows oper-
ating system. By the time you complete this book, you will have a thorough understanding
of C# and will have used it to build Windows Presentation Foundation (WPF) applications,
access Microsoft SQL Server databases, develop ASP.NET Web applications, and build and
consume a Windows Communication Foundation service.
Finding Your Best Starting Point in This Book
This book is designed to help you build skills in a number of essential areas. You can use
this book if you are new to programming or if you are switching from another programming
language such as C, C++, Sun Microsystems Java, or Visual Basic. Use the following table to
find your best starting point.
xix
60种皮肤界面ssk文件
60种皮肤界面ssk文件
60种皮肤界面ssk文件
60种皮肤界面ssk文件
infopower 4000
InfoPower.v4000.0.5.Full.Source.For.Delphi7
DELPHI 读取内存
一个利用DELPHI读取运行中进程内存的示例程序
网络流量查看器wanglonliul
网络流量查看器,wanglonliul.exe
网络流量查看器,wanglonliul.exe
_Microsoft .NET开发人员职业规划蓝图和学习路线图
_Microsoft .NET开发人员职业规划蓝图和学习路线图.pdf
sniffer pro 4.70.530汉化注册版
sniffer pro 4.70.530汉化注册版
sniffer pro,NAI公司出品的可能是目前最好的网络协议分析软件之一了,支持各种平台,性能优越,做为一名合格的网络管理员肯定需要有这么一套好的网络协议分析软件了,只是有点大请用下载工具下载。SN:SA154-2558Y-255T9-2LASH
Iris_Trial
网络包分析工具Iris_Trial
Iris_Trial
Iris_Trial
Iris_Trial
Iris_Trial
MSChart_VisualStudioAddOn
MSChart_VisualStudioAddOn vs专业图表
Microsoft Business Intelligence Interoperability with SAP
Microsoft Business Intelligence Interoperability with SAP
tcpTrace081
tcpTrace
I got fed up with installing Java & Apache SOAP just to get tcpTunnelGUI, so here's a native Win32 version, built using Attila (no MFC :) ). It started out as a copy of the Apache tool, but has taken on a life of its own!.
Huh, it does what ?
Basically you use it as a tunnel between your client & server. Start tcptrace.exe and up comes a dialog box asking for local port #, destination server, and destination port # (Ignore the logging options for now) . Fill these in, click Ok, and wow are you going to have fun. For example if you are writing a client and testing against a remote server (say www.razorsoft.net ), you can setup
Local Port # 8080
Destination Server www.razorsoft.net
Destination Port # 80
Now configure your client so that it thinks the server is at localhost:8080. tcpTrace will forward all the traffic from localport:8080 to the remote server (and vica versa), dumping the contents in the process. If you are hosting a server say on port 80 and want to use it, then change your server to run on port 81, and setup
Local Port # 80
Destination Server localhost
Destination Port # 81
you can now see your incoming traffic.
It should work with all the text based IP protocols, I've been using it with SOAP (port 80) & HTTP (port 80), and I know Peter Drayton has been using it with POP3 (port 110) & SMTP (port 25)
Command Line Options
If you prefer to set-up a tcpTrace session via a command line rather than via the GUI, then there are the following command line options
/listen <port> : specifies the local port to listen on.
/serverPort <port> : specifies the destination port to forward traffic to.
/serverName <servername> : specifies the destination server to forward traffic to.
/log <log filename> : enables logging to the specified file.
/logFormat <xml | plain> : specifies the logfile format (when logging is enabled) use xml or plain (plain is default).
/title <window title> : this overrides the default tcpTrace window title, is useful if you regularly run multiple instances of tcpTrace.
/kill : stops all running instances of tcpTrace and exits. this can be useful for batch based testing.
e.g.
tcptrace /listen 8080 /serverPort 80 /serverName services2.xmethods.net
tcptrace /listen 8081 /serverPort 80 /serverName soap.4s4c.com /log c:\log.xml /logFormat xml
tcptrace /listen 5049 /serverPort 5049 /serverName nagoya.apache.org /title "Apache Server"
If you're doing pure SOAP/HTTP work, you'll want to take a look at proxyTrace as well.
My thanks to the following people for helping out
Peter Drayton for badgering me into writing the logging support.
Matt Humphrey for spotting and fixing a problem with large payloads and the socket shutdown sequence.
Steve Witham for fixing my terrible docs, any errors are of course still mine.
Everyone who made suggestions for new features.
Release History
v0.8.1 (Build 717) May 28, 2005
Can now enter upto 500 characters for the server name.
v0.8.0 (Build 712) December 17, 2003
If it can't listen on the specified local port it reports an error instead of silently failing.
v0.7.3 (Build 710) December 28, 2002
Trace settings are now reflected in the window title when /title hasn't been used. Thanks to Tomas Restrepo for the suggestion.
v0.7.2 (Build 708) December 28, 2002
Added option to fix-up single \r & \n into windows linefeeds so that the display stays formated when tracing against non-windows applications.
v0.7.1 (Build 683) December 18, 2002
Added "Show Nulls" option, so that data past a NULL character can be seen.
v0.7.0 (Build 669) July 6, 2002
Can now select separate fonts for the list view and the text windows.
word wrap setting now remembered across invocations.
bug with word wrap toggle loosing font setting fixed.
v0.6.0 (Build 648) March 27, 2002 [aka the Conference Presenters Edition!]
Font selection is now remembered across invocations.
The /title command line option added to override the standard window title, useful if you have lots of instances running at the same time.
Connections that were still active when the trace is stopped, now have their data flushed to the log file.
A problem with line endings in the XML log was fixed.
v0.5.0 (Build 626) September 2, 2001
Added support for changing the display font.
Fixed the problems with clear.
The payload views for the active connection are now dynamically updated.
v0.4.0 (Build 521) February 21, 2001
Added support to log the trace info to a file either in plain text or XML format.
Added support for starting / stopping / logging from the command line (via Chris Sells's excellent command line parser).
Added a stop trace feature
v0.3.0 (Build 234) January 15, 2001
Matt Humphrey fixed a problem with large payloads getting truncated / dropped bytes
Matt Humphrey fixed a problem with the socket shutdown sequnce
Matt Humphrey added support for the up and down cursor keys to work on the connection list
Added word wrap support for the request / response windows
v0.2.1 (Build 122) December 1, 2000
Corrected the tab order on the trace settings dialog
v0.2.0 (Build 120) September 30, 2000
The last used Trace settings are now remembered for next time
Trace dialog box initially pops up
Legal gunk added to about dialog box
Updated docs with additions from Steve Witham
Added copy of these docs to the download
v0.1.0 (Build 92) September 12, 2000
Initial Release
WCF+RIA+Service+Silverlight
WCF+RIA+Service+Silverlight
SAP Enterprise Services Explorer 1.1 for Microsoft .NET
SAP Enterprise Services Explorer 1.1 for Microsoft .NET
Windows Communication Foundation
WCF入门,Windows Communication Foundation 入门(Part One)
清除IE产生的临时垃圾文件
清除IE产生的临时垃圾文件,直接打开就好,为你节省好多的时间
powerdesigner 使用建議
powerdesigner 使用建議:1.业务规则的使用(Business Rule)2.自定义数据类型(Domains)的使用3.
关于powerdesigner中的数据结构的变更管理.and so !