background preloader

Microsoft

Facebook Twitter

WCF RIA Services Part 7 - Authentication and Authorization. This article is Part 7 of the series WCF RIA Services. Introduction In this article, I’ll focus on the security capabilities of WCF RIA Services. Security is one of the areas where RIA Services took something that is vitally important to an application and can be very complex when using WCF on its own, and gave us a simple to use approach that covers 80% of the cases with minimal code and confusion, while still covering most of the remaining 20% nicely with the extensibility hooks in RIA Services for security. Like many other aspects of RIA Services, you are insulated from the service level plumbing that needs to happen to secure your communications and calls and just lets you focus on putting the checks and balances in place to make sure that only things that are supposed to happen in your application are allowed.

There are three concerns to focus on with service security: authentication, authorization, and transfer security. WCF RIA Services security allows you to: return user ! Set { } Optimisation de code: gérer la mémoire .NET plus efficacement – 2e partie - Version imprimable - ZDNet.fr. Arch# MTOM vs. Streaming vs. Compression – Large attachments over WCF « Niraj Bhatt – Architect's Blog. Above question pops up when one is about to do a large transfer of data (images for instance) using WCF.

MTOM vs. Streaming vs. Compression – Large attachments over WCF « Niraj Bhatt – Architect's Blog

Let me try answer this starting with basics. Bandwidth & Buffer – There are 2 considerations to large transfers. First – you want to transfer as minimal as possible in terms of size (bytes) to avoid bandwidth cost which normally matters a lot when you are over WAN paying for it & Second – whether you want to transfer the entire message (read the entire image in memory on client & send it to server) or you want to stream it byte by byte.

Streaming sometimes is necessary as buffering can adversely affect performance of your server in case of multiple clients (e.g. 20 clients concurrently transferring a 100 MB image, which would take up to 2 GB of your server’s RAM). So coming to title of this post – MTOM is related to Bandwidth while Streaming is related to Buffering. Why MTOM? Compression – WCF’s extensible channel architecture allows us to easily plug-in a compression channel. Digg. Securing .NET Web Services with the WS-Security Protocol. Adding a Security Token Because all messages sent to a WSE-enabled application must contain at least one security token, you need to instruct WSE to add a username token to the application's request to the Hello World Web service.

Securing .NET Web Services with the WS-Security Protocol

You do that by adding a UsernameToken object to the SoapContext for the request message. The following code adds a UsernameToken and a new digital signature to the SoapContext object before making the Web service request to the GetHelloWorld method. // Instantiate the HelloWorldWse class. HelloWorldWse myService = new HelloWorldWse(); // Get the SoapContext object for the // outgoing message. SoapContext myContext = myService.RequestSoapContext; // Instantiate a new UsernameToken object. Note that by using a signature as proof-of-possession, you can specify the PasswordOption.SendNone so WSE doesn't send the password in the header. In this case, WSE generates a UsernameToken element in the message's Security header. Application Architecture Guide, 2nd Edition. Patterns & practices Developer Center October 2009 This guide is available online here in the MSDN Library and as a Microsoft Press book, ISBN# 9780735627109, that you can purchase through local and online booksellers such as Amazon, Barnes & Noble and BORDERS.

Application Architecture Guide, 2nd Edition

The guide is intended to help developers and solution architects design and build effective, high quality applications using the Microsoft platform and the .NET Framework more quickly and with less risk; it provides guidance for using architecture principles, design principles, and patterns that are tried and trusted. The guidance is presented in sections that correspond to major architecture and design focus points. It is designed to be used as a reference resource or to be read from beginning to end. The guide helps you to: Understand the underlying architecture and design principles and patterns for developing successful solutions on the Microsoft platform and the .NET Framework. The guide contains the following topics:

Delegates and Events in C# / .NET. C# 4.0 : retourner plusieurs valeurs en “Tuple” ?? Operator.

WPF