What is .NET XmlSerializer?
2008 Jun 02
1 of 153 | HOWTO: Change IIS User Impersonation Token - Question:
Hi,
We are using our third party component for doing authentication and authorization with IIS6 web server on win2k3 X64 EE. Here we are using IMPERSONATION concept for this integration.
Can anybody describe the required configuration which are needed at IIS 6 for successfully impersonation of users with third party component?
Should we need to set Anonymous authentication explicitely for this kind of configuration?
Answer:
Third party code will not be able to directly impersonate and have IIS use that user token. IIS will:
Strip off the impersonation token after ISAPI Extension returns control to it
Ignore and re-apply IIS's desired impersonation token if ISAPI Filter c......
2008 May 30
2 of 153 | ???????? XNA: ????? ????? ???? ?????? Visual3D.NET - Beta 2 - XNA ??????????? ??????? ??????? ? ???????? ???? ????? ??????? ??????? ?? Realmware Corporation ??? ????????? Visual3d.NET
www.visual3d.net
?????? ????? ?????? Beta ????? ????????.
??? ???????? ?????? ????????????:API:1. ??????? ??????: ???????, ????????, ?????????????? ???????; ?????????? ????? ???????? ? ?????????; ????????? ???????????????; ???????????? hardware ? shader instancing2. ???????: ????????? ???????? .FX (?????? ????????????? ? DX SAS, ????????? NVidia FX Composer), HLSL ??? ??? ?????????????? ????? ????????? ?????????3. #SL – ??????? ?? C#: HLSL ??? ???????????? ?? ???? ?? ???????, ?????????? ?? C#, ?? ???????????? ??????? IL, ?????????? ???????? ????? ????? ? ?????????, ??......
2008 May 06
3 of 153 | XML Serializable Dictionary - Typically generic dictionaries are not serializable. For serializing the generic dictionaries we can write custom xml serializable dictionary class by inheriting from Dictionary<TKey, TValue> and also implementing the IXmlSerializable interface.
Below code snippet contains the code of XMLSerializable dictionary.
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
using System.Runtime.Serialization;
namespace CustomType
{
/// <summary>
/// Xml serializable dictionary object.
/// </summary>
/// <typeparam name="TKe......
2008 Apr 21
4 of 153 | JSONVid: Pure JavaScript Video Player - Jacob Seidelin went on a ( crazy :) ) mission to create a pure JavaScript video player that didn't use Flash:
My first thought was to read binary video files using a technique like the Andy Na posted about here, figuring that there must be some really simple to parse video formats around, but I soon changed directions and decided to make up a whole new video format. Enter.. JSONVid. Using a player like mplayer, it is easy to export all frames in a movie clip to individual jpeg files, and using whichever language you prefer it is also fairly trivial to collect these files, base64 encode the bunch of them and throw them all together in a nice JSON file (I used this PHP script).
The forma......
2008 Apr 20
5 of 153 | Grouping, while publishing a ClickOnce application. - When we publish our application, Initially there is only a single group named Required.
In our application, sometimes we would like to use XMLSerializer for optimization. This will create XMLSerializer.dll in your application.
This XMLSerializer.dll we normally dont want to download everytime, when we publish our application again after some changes and want it to be downloaded for specific set of users.
We can create a separate group for XMLSerializer.dll in ClickOnce, which will specify it to be downloaded to some set of user who belongs to that group.
Note: Never put XMLSerializer.dll and main application dll or exe in same group.
...
2008 Apr 03
6 of 153 | Simple Question on .NET - Next >>
When was .NET announced?
Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and delegates were given CDs containing a pre-release version of the .NET framework/SDK and Visual Studio.NET.
When was the first version of .NET released?
The final version of the 1.0 SDK and runtime was made publicly available around 6pm PST on 15-Jan-2002. At the same time, the final version of Visual Studio.NET was made available to MSDN subscribers.
What platforms does the .NET Framework run on?
The runtime supports Windows XP, Windows 2000, NT4 SP6a and Windows ME/98. Windows 95......
2008 Mar 29
7 of 153 | Encrypting Information in SharePoint Lists - Encrypting the information contained in SharePoint lists is a common request that I have heard from colleagues and customers. SharePoint does not provide any built-in mechanism for encrypting the information that is contained in the content database. Sometimes a list might contain sensitive information, such as the social security number for an individual. Once this information is entered into a SharePoint list, it is stored in the content database in plain sight of anyone that is able to view the database. We should implement stringent security to limit who can access the database, but it can also be good to add another layer of security protection for the sensitive data......
2008 Mar 24
8 of 153 | FaviconGrabber and Social Graph - Alistair Rutherford has written a nice looking Flex application that visualizes the Social Graph API:
Alistair told us about the application, and some of the fun features:
The initial version was a bit boring looking so I thought it would be nice to pull the ‘favicons’ for the sites returned in the results. I have detailed how I did this here
Because I could not fetch the icons directly using HTTPService I have used a cgi proxy script written in Python to fetch the target icons and convert them into a Base64 encoded string before returning the data to the Flex application.
The Flex application decodes the Base64 and then passes the data to a modifed version of the IconLoader class f......
2008 Mar 23
9 of 153 | DataTable to JSON and ToJSON() Extension - Very recently I wrote an application where I had to deal with DataSet from a Web Service. Please note, I have no control on the Web Service and I ended up writing a small function which converts DataTable to JSON. I understand I haven't gain anything on the web traffic, but it surely simplified my JavaScript programming. Let me go through what I did Step 1. Extract the XML Schema. DataTable has two handy methods to extract Xml and Xml Schema. I extracted the Xml Schema to be able to generate a C# class using the xsd.exe. string path = "Your File Path"; myDataTable.WriteXml(path); myDataTable.WriteXmlSchema(path); Step 2. Generate C# Class using X......
2008 Mar 20
10 of 153 | ASP.NET Basics: Foundation of ASP.NET - This has been pooled together from a number of resources: What is ASP.NET? Microsoft ASP.NET is a server side technology that enables programmers to build dynamic Web sites, web applications, and XML Web services. It is a part of the .NET based environment and is built on the Common Language Runtime (CLR) . So programmers can write ASP.NET code using any .NET compatible language. What are the differences between ASP.NET 1.1 and ASP.NET 2.0? A comparison chart containing the differences between ASP.NET 1.1 and ASP.NET 2.0 can be found over here. Which is the latest version of ASP.NET? What were the previous versions released? The latest version of ASP.NET is 2.0. There have been 3 vers......
11 of 153 | The Performance Woe of Binary XML - Analysis on why binary XML doesn't solve the real issue of XML performance...
2008 Mar 11
12 of 153 | Auto Generate a class from a Web Service or an XML file. - Lets Say ...
you are working on a COM component in C# that will wrap a Web Service.
Callers of your object \ class want to use a particular web service but can not access it directly. So instead they are going to user your COM object as a proxy.
One of the things your COM object must do is mirror a class in the Web Service.
There is a method call to GetSomeStuff() that returns a Stuff object.
public Stuff GetSomeStuff(){....
The client consuming your object has no reference to SomeWebService.NamePace.Stuff and so will be unable to use it.
However, they will have a reference to your COM object and so they will be able to get to MyKickButt.ComObject.Stuff
So your stuff must ha......
2008 Mar 07
13 of 153 | Refactoring to Comply with the DRY principle (Don't Repeat Yourself) - If you're not living DRY, you're not a good programmer.
Okay, I'm not talking about alcohol consumption! I'm talking about the Don't Repeat Yourself principle--a principle every programmer should live by. Recently I did a code review for a project we outsourced, and demonstrated how you can refactor bad cut-and-paste code into well-designed code. You will note that the capabilities of the MagicStringTranslator class really help to reduce code clutter. Without further ado, I present the relevant portion of my code review:
...your branching logic has 12 lines of code in each branch except the final one. I am inserting an excerpt for reference:
if (m_record.Text.Substring(13, 6)......
2008 Feb 26
14 of 153 | ??: .NET????????? - ???: Scott Hanselman ????: Tony Qu ????: http://feed.yeeyan.com/articles/view/15070/5074 ?????????ASP.NET??? ??. ?????????,????????,??????????????????“????,?????????????” ?????????,????????????? ???????.NET???????????????,?????????????????????ASP.NET(?WinForm)???????????????????,???????????????????????????????,??????????????? ????????????——???????,???????????????????????????????,???????????????????????,?????????????????????ASP.NET,?????????ASP.NET????????????????,?????????????????????????4??,????????????,?????????????????????????????,????????????????????? .NET?????????? ??????.NET?? ??????????? ???Windows??,??????????EXE??????? Windows??????????????????????????????????????????????......
2008 Feb 23
15 of 153 | The Performance Woe of Binary XML - Analysis on Why Binary XML doesn't solve the real issue of XML performance...
16 of 153 | Use of SGEN.exe to avoid common XmlSerializer performance pitfalls - This week, I encountered a test scenario which makes use of an XmlSerializer on it's startup path. Unfortunately, MSDN's documentation for the type is not clear on the performance impact of using an XmlSerializer. The documentation on introducing XML serialization, found here, actually mentions the solution, but it also does not state what the problem is.
When you use an XmlSerializer, a helper assembly(1) with a custom type for serializing your type is created. The C# CodeDom is used to generate this code, which then is compiled by the C# compiler. The runtime must then load this generated assembly, and JIT the code. Additionally, a separate assembly is generated for each type you create ......
2008 Feb 16
17 of 153 | "New" Statement Considered Harmful - All of us have probably written code like this:
Foo f = new Foo();
And what could be simpler? As long as the logic in the constructor is simple (or better yet, the constructor is empty), it would seem that the simplest code is the best, so just use the constructor. Certainly the MSDN documentation is rife with code that uses public constructors. You can probably find plenty of public constructors used right here on my blog. Why invest the effort in writing (and using) a factory class that will probably never do anything useful, other than call a public constructor?
In his excellent podcast entitled "Emergent Design: The Evolutionary Nature of Software Development," Scott Bain of Net ......
2008 Feb 05
18 of 153 | Unblocking Adblock -
If you’re using Firefox with the Adblock Plus extension installed … have you noticed anything different on sitepoint.com?
A couple of weeks ago I implemented a site-wide script that unblocks ads which were blocked by Adblock Plus.
See, a while ago, when the whole firefox is blocked debacle was raging, I made some hand-waving statement about how easy it would be to circumvent ad-blocking software (though of course, I wouldn’t say how). Then a little while later (not quite sure when … I was probably drunk) I lost a bet, and had to prove it. The stakes were high, and I felt a little dirty, but I’m a man of my word, so I had to do it. And as it happened, it turned into a fun and interestin......
2008 Jan 17
19 of 153 | XMLSerialization - Solving the "Type Not Statically Known" exception - .NET's XMLSerializer can be pretty stupid. It refuses to serialize an object if its properties are of a derived type. Consider the following example: [Serializable]public classPerson{ public stringFirstName { get; set; } public stringLastName { get; set; }}[Serializable]public classSalesReceipt{ publicPersonCustomer { get; set; }}[Serializable]public classEmployee:Person{ publicDateTime DateOfHire { get; set; }}public classtrythis{ public voidmain() { Employee employee = newEmployee{ DateOfHire = DateTime.UtcNow }; SalesReceipt receipt = newSalesReceipt(); }} If you attempt to serialize the receipt object, the XML Serializer will throw the "Type Not Sta......
2008 Jan 16
20 of 153 | How to Serialize an Interface using the XMLSerializer - The short answer is you can't. At least not without some trickery and giving the serializer some help, and even then it's not pretty. Here's the plain-jane implementation. Note: The following snippet WILL NOT WORK public interface IWorker
{
string WorkerName { get; set; }
}
[Serializable]
public class ImplementedWorker:IWorker
{
#region IWorker Members
public string WorkerName { get; set; }
#endregion
}
[Serializable]
public class WorkToDo
{
public IWorker Worker;
}
public void Tryme()
{
WorkToDo workToDo = new WorkToDo();
workToDo.Worker = new ImplementedWorker();
}
If you try to serialize the Work......
2008 Jan 14
21 of 153 | Queriable Binary XML Encoding -
I blogged about how I ran into polymorphism issues when pursuing my holiday project of a binary XML, but more people were interested in the binary XML format. Attached are my notes on this format.
...
2008 Jan 11
22 of 153 | [Help] XML Serialization Result is Different in Separate Environments - Here’s one for you. I have two Windows Server 2003 environments, and in one environment, a .NET object correctly serializes to XML, and in the next environment it does not.
Let’s set this up. First, I have an existing schema like below where my datetime/number types are both nillable, and have a minOccurs of 0. So, they could exist and be null, or not exist entirely.
Next, I generate a typed object for this schema using xsd.exe. The generated class contains my schema nodes, of course, but xsd.exe also inserts these boolean “[fieldname] + Specified” variables. Now these field accessors have the XmlIgnoreAttribute, so they don’t get included in the XML document, but rather can be used ......
2008 Jan 10
23 of 153 | Using Reflector to search through code and resolve .NET issues - As you already know, i spend my days analyzing dumps for customers, and more often than not I don't have access to the customers code.
I could probably ask for it but it usually takes a long time and even then I often just get partial code, and sometimes, if the customer has multiple environments or if there has been recent changes, the code I would get may not correspond exactly to what was running in production when the dump was taken.
I'm sure many of you are familiar with Lutz Roeder's Reflector already... I just have to say, I just love this tool... it has made my life soo much easier over the years that it's not even funny......
2008 Jan 07
24 of 153 | Dean Edwards IE7.js 2.0 Release - The first famous “IE7″ out there was Dean Edwards script that fixed IE 6 in as many ways as possible.
Now the IE7 browser itself has come out, Dean has updated his library to make sense in the new world, resulting in the new IE7.js 2.0 release which features:
The IE7 project is now hosted on googlecode (I got fed up with SourceForge).
IE7 is no longer modular. Instead I’ve merged the scripts into two: IE7.js and IE8.js
IE7.js includes only fixes that are included in the real MSIE7 browser.
All other enhancements are moved to IE8.js.
IE7 is now much smaller (11KB gzipped).
IE7 is now much faster (it uses the selector engine from base2.DOM)
There are no dependencies on other files ......
2008 Jan 05
25 of 153 | Base64 Encoding And Decoding - Base64 coding/decoding for native C++ and customized coding for C++/CLI...
2008 Jan 04
26 of 153 | Posting File Data Using A Base64 Encoding In ColdFusion - This was sort of based on an Ask Ben inquiry, so I will include it in this section, but it's not entirely accurate. Someone had asked me about passing a file to a web service and I had suggested that one of the ways to do this was to pass it using a Base64 encoding of the binary data. This would allow the data to be easily defined using XML, which is how many web services function (think SOAP, think XML-RPC). While I am not following SOAP or XML-RPC standards in this quick demo, the ideas st ... Read More »...
2008 Jan 02
27 of 153 | User Interface Messages and Strongly Typed Messages - Some time back I wrote an article about how to store and retrieve the user interface messages. When I say user interface messages I meant the messages we display on the screen to notify the user of some operation. These messages can be "Account has been created!", "Details have been updated" and so on. You can view the article here. One problem with the above approach was the weak typing. This means that if I had to display a login successful message I had to send the string "LoginSuccessfull" to the GetMessages(string elementName) method. This introduces bugs and becomes harder to maintain. There is another way to accomplish the same task with the benefit of strong typing. This method in......
2007 Dec 25
28 of 153 | ASP.NET Web Services Interview Questions - ASP.NET Web Services Interview Questions
Which method is used to serialize an object into an XML document from Xmlserializer class?
How to specify the Web Service compile with the WS-I basic profile?
For SOAP (Simple Object Access Protocol) message formatting what is the purpose of Encoded value?
What are the three main section of SOAP (Simple Object Access Protocol) message?
What all steps are required to create an application to test your ASP.NET web services?
How you can verify the result of your ASP.NET web services?
Interview Questions
|
ASP.NET Interview Questions
|
.NET Interview Questions
ASP.NET 2.0 Interview ......
29 of 153 | ASP.NET Web Services Quiz - ASP.NET Web Services Quiz
Which method is used to serialize an object into an XML document from Xmlserializer class?
How to specify the Web Service compile with the WS-I basic profile?
For SOAP (Simple Object Access Protocol) message formatting what is the purpose of Encoded value?
What are the three main section of SOAP (Simple Object Access Protocol) message?
What all steps are required to create an application to test your ASP.NET web services?
How you can verify the result of your ASP.NET web services?
Thanks
~Mahesh
Interview Questions
|
ASP.NET Interview Questions
|
.NET Interview Questions
ASP.NET 2.0 Interv......
2007 Dec 16
30 of 153 | A Deep XmlSerializer, Supporting Complex Classes, Enumerations, Structs, Collections, and Arrays - A deep XmlSerializer, supporting complex classes, enumerations, structs, collections, generics, and arrays...
2007 Dec 03
31 of 153 | Having Fun with Extension Methods :) - Extension Methods is a new feature of the C# language (I think it is called C# 3.0). Extension methods allows you to extend the CLR types. This includes all the types which inherit from the System.Object class. Let's see a small example where I have extended a String to add a new "Reverse" method which gives me the string in reverse. public static string Reverse(this string s) { string r = String.Empty; for (int i = s.Length -1; i >= 0; i--) { r += s[i].ToString(); } return r; } I am using the Extension methods in a separate class. It is a good idea to keep this separation as Extension m......
2007 Nov 22
32 of 153 | Specifiche di base: XML Encryption in pillole... - La specifica XML Encryption [XMLENC xmlns:xenc='http://www.w3.org/2001/04/xmlenc#' ] ha il compito di definire la sintassi e il processo per cifrare dei dati binari o testuali e rappresentarli in formato XML. La struttura XML della specifica si basa sull’elemento EncryptedData : <EncryptedData Id? Type? MimeType? Encoding?>
<EncryptionMethod/>?
<ds:KeyInfo>
<EncryptedKey>?
<AgreementMethod>?
<ds:KeyName>?
<ds:RetrievalMethod>?
<ds:*>?
</ds:KeyInfo>?
<CipherData>
<CipherValue>?
<CipherReference URI?>?
</CipherData>
<EncryptionProperti......
2007 Nov 16
33 of 153 | WebKit 3 shows up with the new Safari - With the OS X push of 10.5.1 and 10.4.11, and a new Safari/Win beta, we see the latest and greatest of WebKit in Safari itself.
To kick this off, Maciej Stachowiak has blogged 10 new things in WebKit 3:
Enhanced Rich Text Editing: And RTE needs help!
Faster JavaScript and DOM: ~2 times faster
Faster Page Loading: WebKit 3 is 1.4 times as fast
SVG: Yay
XPath: Yay
New and Improved XML Technologies: XSLTProcessor, DOMParser, XMLSerializer, a better XHR (”incremental updates for persistent server connections”)
Styleable Form Controls: No more native
Advanced CSS Styling: Text-stroke, text-shadow, and more
Reduced Memory Use: WebKit 3 uses 14% less memory
Web Developer Tools: Web I......
2007 Nov 01
34 of 153 | WBXML support in C# - handy - Open source class to handle WAP Binary XML in C# and CF C#...
2007 Jul 20
35 of 153 | Serialize and deserialize objects as Xml using generic types in C# 2.0 - I've been using Object<>Xml serialization in .NET based on this post for a while. I decided to enhance it a tad bit with some generics, so I could use it more broadly. Here's what I came up with:
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.IO;
using System.Xml.Serialization;
/// <summary>
/// To convert a Byte Array of Unicode values (UTF-8 encoded) to a complete String.
/// </summary>
/// <param name="characters">Unicode Byte Array to be converted to String</param>
/// <returns>String converted from Unicode Byte Array</returns>
private static string UTF8ByteArrayToString(byte[] characters)
{
......
2007 Jul 12
36 of 153 | Working with *Specified Properties. - Problem:The value of DateTime property is assigned but its not included in the serialized xml.SomeClass msg = new SomeClass();msg.generated_on = DateTime.Now ; if we serialize this we will find this: <?xml version="1.0"?><SomeClass xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /> as opposed to<?xml version="1.0"?><SomeClass xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" generated_on="12/07/2007 6:29:28 PM" /> Here is the c# code of SomeClasspublic class SomeClass{ /// <remarks/>[System.Xml.Serialization.XmlAttributeAttribute()]public System.String ......
2007 Jul 11
37 of 153 | Be careful using Member Name with suffix "Specified", it has special meaning to the XmlSerializer - Members with names ending on 'Specified' suffix have special meaning to the XmlSerializer: they control serialization of optional ValueType members and have to be of type System.Boolean.Here is a test class to generate the exception where I explicitly declared the 'generating_bugSpecified' Member to integer.[System.Xml.Serialization.XmlIncludeAttribute(typeof(TestBugg))] public class TestBug{ [System.Xml.Serialization.XmlAttributeAttribute()]public System.Int32 generating_bug; /// <remarks/>[System.Xml.Serialization.XmlIgnoreAttribute()]public int generating_bugSpecified; }Try serializing this above class with XmlSerializer, ie. TestBug bug = new TestBug();bug.generating_bug = 10;Se......
2007 Jul 03
38 of 153 | Mvp.Xml Library version 2.3 released -
I released version 2.3 of the Mvp.Xml Library, which is part of the Mvp.Xml Project developed by Microsoft MVPs in XML technologies worldwide. It is aimed at supplementing .NET framework XML processing functionality. Mvp.Xml Library provides .NET implementations of the EXSLT, XML Base, XInclude, XPointer as well as a unique set of utility classes and tools making XML programming in .NET platform easier, more productive and effective. This is another minor release of the Mvp.Xml Library for .NET 2.0. Version 2.3 fixes lots of bugs and introduces some new features.Most important new features include: XHTML output mode for the MvpXslTransform class XSLT2-like output character......
2007 Jun 01
39 of 153 | W3C EXI Performance Testing Framework - The W3C Efficient XML Interchange (EXI) Performance Testing Framework is now publicly available for download. This is the testing framework used by the EXI WG to evaluate properties of "binary XML" candidates. Specifically, the framework can be used to measure Processing Efficiency and Compactness, and includes support for in-memory and network testing....
2007 Mar 29
40 of 153 | Latest news on Json-lib and xml - Following the recent updates on XML processing in Json-lib, now its possible to work with namespace prefixes and uris. If you feed an XML to the XMLSerializer and that XML has namespace declarations, each declaration will be added with a "@xmlns" prefix to the resulting JSONObject. The namespace handling has one side effect, previously you could read an array definition and the resulting object would be a JSONArray, because arrays do not have properties and the xmlns is a property, the resulting object would be a JSONObject....
2007 Mar 08
41 of 153 | .NET Compact Framework 2.0 SP2 is Available!! - You can download the English version of .NET Compact Framework 2.0 SP2 now
The localized versions should be available soon.
This version provides an update to the Remote Performance Monitor that allows you to now take snapshots of the heap and compare those snapshots over time. If you're not familiar with the Remote Performance Monitor, see Steven Pratschner's (from the .NET CF team) Remote Performance Monitor article.
Here's the published list of bug fixes…
Remote Performance Monitor fails on x64
Setup install/uninstall fails silently when the MSI is launched from Control Panel-Programs and Features on Vista
Finalizers fail on RTF objects because COM bindings are alrea......
2007 Jan 19
42 of 153 | World Wide Web Consortium Selects AgileDelta's Efficient XML as Basis for Global Web Standard Format -
Efficient XML was selected based on a comprehensive, independent review of binary XML formats by the W3C EXI Working Group.
...
2007 Jan 03
43 of 153 | Tim Bray on JSON and XML - Tim has an interesting post comparing JSON and XML that has me wondering about several things.
Here are some specific questions I have with the piece:
1. I don't see any reason why JSON has different streaming characteristics than XML. Every JSON parser I've written has a streaming I/O layer at the bottom and defers buffering (and type mapping) to a layer above, just like most modern XML stacks. Why is XML inherently more streamable?
2. Like Joe Gregorio states in the comments on Tim's post, I also prefer JSON's simplification of only allowing UTF-*-based encoding.
3. Tim states that you should use XML when the order of data matters, but JSON has a perfectly reason......
2006 Nov 20
44 of 153 | People are reflecting on XML after 10 years - Although XML wasn't officially released as a W3C Recommendation until February 1998, the effort that led to it began about 10 years ago. One recent anniversary is the first public working draft released on November 14, 1996. Another is its first public presentation at the SGML 1996 conference; the XML 2006 conference is being held and the same location and will include a retrospective by Jon Bosak, chair of the original XML WG. The IBM Systems Journal even has as special issue Celebrating 10 Years of XML. Yet as the Slashdot thread that dissects it makes clear, not everyone is celebrating. (The most memorable bit is Ti......
2006 Oct 02
45 of 153 | Collection properties need a setter implementation when using DataContractSerializer - I was having a problem with serializing a FaultException that had a custom details class that was a collection. Today I figured out that, when using the DataContractSerializer, you need to make sure you provide a setter implementation even for your collection based properties. Once again, this is a departure from the way that the XmlSerializer works. I'm trying to work through the scenarios where this is any kind of improvement over XmlSerializer, but I cannot think of any problem this solves.
Welp, I hope this saves someone else some headscratching. I truly hope Microsoft lifts the restriction of only being able to serialize fault details with the DataContractSerializer... I'm just not a ......
2006 Sep 28
46 of 153 | Collection property serialization with DataContractSerializer takes us a step backwards? - Since I have to define my fault details with DataContractSerializer attributes for now (I hope it's only for now anyway), I was looking at how to translate a property that was previously serialized by the XmlSerializer using XmlArrayAttribute and XmlArrayItemAttribute. Well, I figured out pretty quick there was no equivalent, found CollectionDataContractAttribute, but thought "noooo, this can't be the only way... can it?". Unfortunately a quick search revealed this post by Christian Weyer that confirmed my fears. Why oh why do I have to go writing a whole new collection class now just to decorate it with attributes when I could decorate the member itself?
Argh... there's nothing more frus......
2006 Sep 26
47 of 153 | Lightweight Invisible CAPTCHA Validator Control - Not too long ago I wrote about using heuristics to fight comment spam. A little later I pointed to the NoBot control as an independent implementation of the ideas I mentioned using Atlas. I think that control is a great start, but it does suffer from a few minor issues that prevent me from using it immediately. It requires Atlas and Atlas is pretty heavyweight. Atlas is pre-release right now. We’re waiting on a bug fix in Atlas to be implemented. It is not accessible as it doesn’t work if javascript is enabled. Let me elaborate on the first point. In order to get the NoBot control working, a developer needs to add a reference to two separate assemblies, Atlas and the Atlas Control To......
2006 Sep 20
48 of 153 | A deep XmlSerializer, supporting complex classes, enumerations, structs, collections, and arrays - A deep XmlSerializer, supporting complex classes, enumerations, structs, collections, and arrays....
2006 Aug 14
49 of 153 | UTF-8 Email in PHP with eZ Components - One of the subjects I brushed over last week was how you handle UTF-8 in email, because I don’t have a full picture on the best way to solve this. The fundamental problem is summarized nicely on Wikipedia’s discussion of MIME;
The basic Internet e-mail transmission protocol, SMTP, supports only 7-bit ASCII characters […]. This effectively limits Internet e-mail to messages which, when transmitted, include only the characters sufficient for writing a small number of languages, primarily English. Other languages based on the Latin alphabet typically include diacritics not supported in 7-bit ASCII, meaning text in these languages cannot be correctly represented in basic e-mail.
Part of th......
2006 Jul 21
50 of 153 | Processing Binary Documents Through BizTalk Via Web Services -
Just finishing up a two-week BizTalk Proof of Concept where I demonstrated an easier way to manage B2B interactions between a large
insurance company and their vendors. This post is focused on one part of the solution that accepts binary messages via web services,
and uses BizTalk to extract the message and send to SharePoint.
Instead of using DIME or MTOM, this company exposes a web service where the vendor puts a binary blob into a web service message
element. So how did I match this requirement? First, I started with the XML schema for the service interface. Instead of holding a
binary node, my DocumentContent node holds a string (base64).
The most important step......