WCF Extension : Inject and Inspect Custom Message
While working with WCF, we often need transfer some kind of data in message headers. For example, in order to authenticate the caller of WCF service, we need pass username and password into the message header, then in the service side retrieve them and validate them. But how can we inject a custom message on WCF client side and retrieve it on WCF service side? The key is System.ServiceModel.Dispatcher.IClientMessageInspector and System.ServiceModel.Dispatcher.IDispatchMessageInspector. To learn
WCF Services Sample: Authenticate Silverlight Client based on UserName and Password
In the <<WCF Sevices Sample>> series, I have gone through WCF service creation, hosting, transport protocol supporting. By now our service can be accessed by anyone from anywhere, because we did not authenticate the service caller. The Windows Communication Foundation (WCF) provides many choice for us on service security. For more information about this subject, please refer to MSDN.In this blog I'd like to talk about WCF service authentication based on username and password. I'd lik
WCF Services Sample: Config WCF services over HTTPS only
In my previous blogs I have introduced how to create a WCF service and host it in IIS, and config it over both Http and Https. In this blog I would like to move forward -- config the service work over only HTTPS. I will still use that sample project.1. Setup Web Application with SSL RequiredOpen the IIS Manager, Select "ServiceHost" web application under the default web site as shown below.Double-click "SSL Settings" on the right frame, the "SSL Settings" window is
WCF Services Sample:Config over both HTTP and HTTPS
In my blog "WCF Services Sample: create a Silverlight client application", I show you how to config WCF service and Silverlight to communicate over HTTP. In this blog I will introduce how to config WCF service over both HTTP and HTTPS. I still use that sample project in this blog.1. Setup IIS to Enable SSLBefore WCF service can work over HTTPS, we must setup IIS to enable SSL. I have talked about this subject in my another blog, please refer to it for more details.2. WCF Service Config
WCF Services Sample: create a Silverlight client application
In my previous blog, I created a WCF service and hosted it in IIS. In this blog I will create a Silverlight client application to call that service, and host the Silverlight client in a ASP.Net web application.1. Create a Silverlight ApplicationRight click the solution in the Solution Explorer, Add -> New Project. In the window below, select "Silverlight" as Project Type, select "Silverlight Application" Template, input project Name and Location, then click "OK".
WCF Services Sample: Create and Host a Service in IIS
In this blog I will show you how to create and host a WCF services from scratch.1. Define the Services ContractOpen Visual Studio 2008, File -> New -> Project. It will open the "New Project" window for you. Select "Web" under the "Visual C#" on the left treeview "Project types", then select "WCF Service Application" under the "Templates" on the right side window. Input the project Name and Location,check "Create dictionary fo
WCF Essentials (5)
11. WCF ArchitectureWCF offers immensely valuable support for reliability, transactions, concurrency management, security, and instance activation, all of which rely on the WCF interception-based architecture. Having the client interact with a proxy means that WCF is always present between the service and the client, intercepting the call and performing pre- and post-call processing. The interception starts when the proxy serializes the call stack frame to a message and sends the message down a
WCF Essentials (4)
9. EndpointsEvery service is associated with an address that defines where the service is, a binding that defines how to communicate with the service, and a contract that defines what the service does. This triumvirate governing the service is easy to remember as the ABC of the service. WCF formalizes this relationship in the form of an endpoint. The endpoint is the fusion of the address, contract, and binding.Every endpoint must have all three elements, and the host exposes the endpoint. Logica
WCF Essentials (3)
8. BindingsThere are multiple aspects of communication with any given service, and there are many possible communication patterns: messages can be synchronous request/reply or asynchronous fire-and-forget; messages can be bidirectional; messages can be delivered immediately or queued; and the queues can be durable or volatile. There are many possible transport protocols for the messages, such as HTTP (or HTTPS), TCP, P2P (peer network), IPC (named pipes), or MSMQ. There are a few possible messag
WCF Essentials (2)
5. AddressesIn WCF, every service is associated with a unique address. The address provides two important elements: the location of the service and the transport protocol or transport schema used to communicate with the service. The location portion of the address indicates the name of the target machine, site, or network; a communication port, pipe, or queue; and an optional specific path or URI. A URI is a Universal Resource Identifier, and can be any unique string, such as the service name or
WCF Essentials (1)
1. What Is WCF?Windows Communication Foundation (WCF) is an SDK for developing and deploying services on Windows. WCF provides a runtime environment for your services, enabling you to expose CLR types as services, and to consume other services as CLR types.WCF is Microsoft's implementation of a set of industry standards defining service interactions, type conversion, marshaling, and various protocols' management. The first release of WCF provides many useful facilities for developing services, s
Team Foundation Server 2005 (Chs) Setup Step by Step
In my recent project,I use Team Foundation Server as source control and project management tool. It is the first time I have a chance to touch TFS, and it has taken me nearly a week time to setup and config it successfully. It is really not a simple job to setup TFS if you are newer to it.I would like to share my expierence with you, I hope it can give you helps and save your time.GoalI'd like to adapt Team Foundation Server Single-Server Deployment.Hardware RequirementsProcessor : 2.2 GHz Penti
How to: Install Microsoft Windows SharePoint Services for Team Foundation Server (Single-Server Depl
Follow these steps to install Microsoft Windows SharePoint Services with Service Pack 2 for Team Foundation Server to run silently from the command line or interactively use the setup wizard. Before installing Team Foundation Server on a localized version of Windows SharePoint Services, you must first install the Windows SharePoint Services language pack that matches the Team Foundation Server language you are going to install. For example, you must install the English Windows SharePo
Visual Studio 2005 Team Foundation Server Installation Guide
OverviewVisual Studio 2005 Team Foundation Server provides team collaboration tools that enable organizations to manage and track the progress and health of software projects. Team Explorer integrates the project work products found on the project site into the Visual Studio IDE for efficient team access. Team Foundation also provides extensible work item tracking and enterprise-class version control systems.Start Here to InstallTo successfully install Team Foundation Server on new computers, yo
WCF Security:Silverlight authentication for WCF service based on security token
In my previous blogs I show you how to authenticate WCF service client base on username/password. That is very available for ASP.Net client. But with Silverlight client, it is not available. THe Silverlight application is running on the remote machine of end users, it is not acceptable to transfer usename/password in cleartext in the wire. In addition, Silverlight supports BasicHttpBinding only,so security in transport level is not supported. In order to authenticate Silverlight calle
an unhandled win32 exception occurred in iexplore.exe
I installed Windws Server 2003 enterprise version on my server, then I use windows update to install sp2. now I open IE, it popup an exception as below:After googled, I found a solution for this question.After Visual Studio is installed on a server, the default behavior when an unhandled exception occurs is to show an Exception dialog that requires user intervention to either start Just-In-Time debugging or ignore the exception. This may be undesirable for unattended operation. To configure the
Activities of one day in agile project
This is a real case from our customer AIS. Our offshore develop team(called OPTM below) is responsible for improving and supporting the Sentry project. OPTM consists of 7 team members: Role Name Project Lead (From AIS) ypzh Dev Leader Polo Developer Eric, lee, dou ,tbo, jtian We adapt the agile software develop process. The following is activities of one day. Time Activity Participant 9:00 am Begin to work. Connect to
WCF Security:authentication base on Username/Password - Part III
1. By now ,we know how to config our WCF webservice and client so that it can work base on Usename authentication,with either basicHttpBinding or wsHttpBinding. Note the security mode. Using Transport only would leave us no options for a custom username / password scenario; basic and digest both don’t play nice with WCF's custom username / password mechanism. Ideal would be Message security, but the combination of Message security and basicHttpBinding doesn’t support a username / pas
WCF Security:authentication based on Username/Password - Part II
Error Message Could not find a base address that matches scheme http for the endpoint with binding MetadataExchangeHttpBinding. Registered base address schemes are [https]. Incorrect Config <behaviors> <serviceBehaviors> <behavior name="DataDistribution.ServiceImplementation.DataDistributionService_Behavior"> <serviceDebug includeExceptionDetailInFaults="true" /> <serviceMetadata httpGetEnabled="true" /> &l
WCF Security:authentication based on Username/Password - Part I
Goals: To enhancement security of WCF webservice, we need to authenticate the client of our WCF webservice. In the case of Sentry Project, we choose to authenticate the client of WCF webservice base on username/password,via a custom UserNamePasswordValidator type. We need a Declarative mode by setting configurations of WCF and the client. Questions: While researching, I encountered the following troubles: 1. While chosen “Username” option with Message Security, WCF limits the us