Sign In
MSDN Blogs
Microsoft Blog Images
More ...
Common Tasks
Blog Home
Email Blog Author
RSS for comments
RSS for posts
Atom
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
.net
behaviors
configuration
datacontractresolver
datacontractserializer
IIS
metadata
refreshsection
Serialization
svcutil
wcf
wsdl
xmlserializer
xsd
Archives
Archives
June 2011
(1)
September 2010
(1)
June 2010
(1)
May 2010
(1)
March 2010
(1)
January 2010
(1)
December 2009
(1)
November 2009
(3)
October 2009
(1)
August 2009
(1)
July 2009
(2)
June 2009
(3)
May 2009
(1)
April 2009
(4)
MSDN Blogs
>
Youssef Moussaoui's WCF blog
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Youssef Moussaoui's WCF blog
Using the [ContractNamespace] attribute to customize the namespace for POCO types
Posted
7 months ago
by
Youssef Moussaoui - MSFT
0
Comments
In .NET 3.5 SP1, DataContractSerializer was enhanced to support POCO types that weren’t marked with any serialization attributes at all. You can find my previous post about serializing POCO types here . But in some cases, you may want to customize...
Youssef Moussaoui's WCF blog
Loading WCF Client Configuration from Different Files with ConfigurationChannelFactory
Posted
over 2 years ago
by
Youssef Moussaoui - MSFT
1
Comments
One pain point with configuration that WCF developers have run into in previous versions of the framework is the limitation that WCF clients can only use the hosting executable’s configuration file. This can be problematic for clients that...
Youssef Moussaoui's WCF blog
Turning XML into XmlSerializer CLR Types with xsd.exe
Posted
over 2 years ago
by
Youssef Moussaoui - MSFT
0
Comments
Here’s a common dilemma .NET developers encounter when working with XML: I have some XML that I want to represent in a strongly typed way, but I don’t have any XSDs to represent that XML. How do I turn that XML into CLR types that I can serialize...
Youssef Moussaoui's WCF blog
Using XML Schema Import and Export for XmlSerializer
Posted
over 2 years ago
by
Youssef Moussaoui - MSFT
0
Comments
In a previous post, I outlined how you could import and export the XML schema for a type that you’re serializing with DataContractSerializer. Here’s how to do the same thing if you’re serializing objects with XmlSerializer: static void RoundTripXmlMetadata...
Youssef Moussaoui's WCF blog
How to get minOccurs = 0 in the schema for XmlSerializer struct members
Posted
over 2 years ago
by
Youssef Moussaoui - MSFT
4
Comments
If you try exporting the following type into an XML schema: public class Employee { public DateTime BirthDate { get ; set ; } } And you happen to be using XmlSerializer, you may be surprised to find that the schema gets exposed like...
Youssef Moussaoui's WCF blog
How to Change .NET Configuration Files at Runtime (including for WCF)
Posted
over 2 years ago
by
Youssef Moussaoui - MSFT
5
Comments
One of the most common issues people run into with WCF configuration, and .NET applications in general, is that configuration files appear to be fixed. You only have one configuration file for an executable, and you can’t use different configuration files...
Youssef Moussaoui's WCF blog
Behavior Merge in WCF 4.0 Configuration
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
4
Comments
One of the brand new configuration features you can find in the Beta 2 release of .NET 4.0 is the ability to merge behaviors in the configuration hierarchy. This should make it easier to manage behaviors when you want a set of common behaviors to be used...
Youssef Moussaoui's WCF blog
Separating out WCF Configuration Into Multiple Files with configSource
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
1
Comments
WCF configuration files can sometimes be very, very long. And there’s a good reason for that too: WCF makes heavy use of configuration so that you can do just about anything you can do with code in a config file. I recently decided to estimate how much...
Youssef Moussaoui's WCF blog
WCF 101: The Simplest WCF Example You'll Ever See
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
5
Comments
Every once in a while, I’ll encounter a developer that thinks that WCF is too complicated to use. Whereas in fact, the basics of WCF are incredibly simple. MSDN’s tutorial hides this fact by making their introduction to WCF a fairly long and painful 6...
Youssef Moussaoui's WCF blog
Beta 2's out!
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
0
Comments
Ok, so a bit late, but the Beta 2 release of Visual Studio 2010 was released two weeks ago. With Beta 2 come a number of changes to the DataContractResolver, so I’ve finally found the time to update my previous post . For those that have read the post...
Youssef Moussaoui's WCF blog
Reusing Types in Referenced Assemblies with svcutil's /r Switch
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
0
Comments
Everyone’s entitled to their own personal favorite svcutil switch, but mine is the “/reference” switch, or “/r” for short. It allows you to avoid generating a type again if it’s already present in a referenced assembly. Here’s how it works: Let...
Youssef Moussaoui's WCF blog
Serializing Plain Old CLR Object (POCO) types with DataContractSerializer
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
0
Comments
When version 3.0 of the .NET framework shipped, DataContractSerializer could only support a few categories of CLR types. Sowmy has a good list of these that you can find here . The recommended model was to use DataContractAttributes on classes and structs...
Youssef Moussaoui's WCF blog
Optimizing Away Repeat XML Namespace Declarations with DataContractSerializer
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
5
Comments
For performance reasons, DataContractSerializer can’t always figure out what namespaces will be used in a serialized instance ahead of time. And so, you may sometimes end up having a certain XML namespace defined over and over again when it only has to...
Youssef Moussaoui's WCF blog
Comparing the Performance of .NET Serializers
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
7
Comments
The .NET framework comes with a variety of different serializers. Hopefully, my overview of these serializers will have provided some insight into the differences between them and the various advantages and disadvantages of using different serializers...
Youssef Moussaoui's WCF blog
Setting Configuration Defaults with Nameless Elements in WCF 4
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
0
Comments
This is my second post about Beta 1 features in WCF 4.0 after introducing the DataContractResolver . Beta 1 introduces a new way of using WCF configuration. It’s now possible to specify a default for bindings, service behaviors, endpoint behaviors...
Youssef Moussaoui's WCF blog
Customizing the XML for collections with XmlSerializer and DataContractSerializer
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
1
Comments
One of the most common requests I get about serialization is to explain how to get collections to serialize out one way or another to XML. Specifically, developers are interested in being able to manipulate the hierarchy level of the collection within...
Youssef Moussaoui's WCF blog
Configuring Known Types Dynamically - Introducing the DataContractResolver
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
14
Comments
This post has been updated to account for the changes to the DataContractResolver in the Beta 2 release of .NET 4.0. This will be my first of several posts about new features that are showing up in the Beta 1 release of .NET 4.0. Beta 1 was released...
Youssef Moussaoui's WCF blog
Configuring the Client Endpoint for svcutil
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
2
Comments
One of the more common questions I get is along these lines: I want to configure svcutil to use a particular binding. How do I do that? Usually, this happens for one of two reasons: 1) You’ve exposed your metadata with a secure binding...
Youssef Moussaoui's WCF blog
Using XML Schema Import and Export for DataContractSerializer
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
2
Comments
For many WCF developers, service metadata import and export is a magical thing. You start your service with a serviceMetadataBehavior, set httpGetEnabled to true or add an IMetadataExchange endpoint, and metadata gets automatically generated for you....
Youssef Moussaoui's WCF blog
Testing the performance of known types
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
2
Comments
In my last post , I claimed that one of the reasons you should try to avoid known types is that it significantly degrades performance. But you should never take anyone’s word about performance, so here’s an actual test comparing the performance of using...
Youssef Moussaoui's WCF blog
Understanding Known Types
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
5
Comments
Probably the aspect of WCF serialization developers have the hardest time with is known types. In fact, many developers don't even understand why DataContractSerializer needs known types. They get so used to the principles of object-oriented design that...
Youssef Moussaoui's WCF blog
An overview of .NET serializers
Posted
over 3 years ago
by
Youssef Moussaoui - MSFT
3
Comments
A common question developers have about serialization in .NET is what serializer they should use. The answer usually depends on two things: what format you want your serialized data to be in and whether you want to be working with shared types or shared...
Page 1 of 1 (22 items)