What is .NET XmlSerializer?
2008 Nov 21
1 of 174 | New additions in 3.5 Sp1 - In .NET 3.5 SP1 the following features are added to the DataContractSerializer.
1. Support for POCO types. Aaron has a nice writeup here. I have updated my post on Serialization Rules to include this.
2. Support for get-only collection properties.
3. Support for schema-verifiable multiple object reference (i.e using the same instance of an object in two places)
Another new feature worth mentioning is the support of XmlSerializer for serialization of faults. I will write more about each of these features in the near future....
2008 Nov 14
2 of 174 | The $64 String... - With apologies to the game show...
I was working on a cryptography project, and, without going into detail (it's SECRET, duh), I was having some issues. The other party sent me their test key in a text file, and it was Base64 encoded. Naturally, being the smart id10t that I am, I popped open my handy dandy, Base64 decoder site, decoded the string, and placed the string in the proper location for it to be used in the decoding process. Lo and behold the decryption process broke...because the key was too small!
In my investigation, it turns out that decoding it by any means other than Convert.FromBase64String() resulted in a byte array with only 31 bytes. Since a 256-bit key requires a 32-......
3 of 174 | XmlSerializerFactory caching issues and leaks - You'd think that after the serious leaks people was hitting with the XmlSerializer, the "new" (in .NET 2.0!!! but which many seem to forget about, just like AVOID doing new XmlTextReader in a PDC *keynote*) XmlSerializerFactory would do away with those. Well, bad news: you need to be AS careful as you are with the XmlSerializer in order to avoid those leaks (which are BY DESIGN, BTW). Turns out that apparently the same designer made the same "by design" decisions with the XmlSerializerFactory. For those not using the factory yet: it was basically meant to be the cache of XmlSerializer types that you had to do manually in the past). If provides a factory method with all the same overloads t......
2008 Nov 10
4 of 174 | NAV 2009 and Unicode! - The title might be a bit misleading, but I am writing this post as a response to a problem, which a partner ran into with NAV 2009 - and the problem is caused by Unicode. I am not a Unicode expert, so bare with me if I am naming some things wrong. As you know, NAV 2009 is a 3T architecture and the Service Tier is 95% managed code (only the lower pieces of the data stack is still unmanaged code). You probably also know, that managed code supports Unicode natively - in fact a string in C# or VB.Net is by default a Unicode string. In C# you use byte[] if you need to work with binary data. My earlier post about transferring binary data between the Service Tier and Client Side COM or Web Servi......
2008 Oct 19
5 of 174 | Binary XML (EXI) Last Call -
On September 19, the W3C published the Last Call Working Draft for Efficient XML Interchange (EXI) -- which allows XML-based implementations to exchange documents without having to use XML's verbose syntax.
...
2008 Oct 17
6 of 174 | What happened to the WPD data in the thing type with HVCC V2? - In the latest version of HealthVault Connection center, we have optimized the size of the data being sent from the device to the HealthVault platform. The WPD data is being stored in the "other-data" section. This content is in a zipped-base64 package that can be acessed with some additional work. Below is sample code that is able to access the WPD content.
/// <summary>
/// The sample function demonstrating how to get WPD data from items uploaded to HealthVault
/// by v1.x (old behavior) and by v 2.x client (new behavior).
 ......
2008 Oct 04
7 of 174 | Serializing internal types using XmlSerializer - Being able to serialize internal types is one of the common requests seen by the XmlSerializer team. It is a reasonable request from people shipping libraries. They do not want to make the XmlSerializer types public just for the sake of the serializer. I recently moved from the team that wrote the XmlSerializer to a team that consumes XmlSerializer. When I came across a similar request I said, "No way. Use DataContractSerializer".
The reason is simple. XmlSerializer works by generating code. The generated code lives in a dynamically generated assembly and needs to access the types being serialized. Since XmlSerializer was developed in a time before the advent of lightweight ......
2008 Oct 01
8 of 174 | XMLSerializer, XDocument and LINQ - I took the sample from my previous post and wanted to use LINQ to query the XML. You can pretty much use the power of SQL on the document object to richly query for things you are looking for.
using System;
using System.Linq;
using System.Xml.Linq;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Serialization;
using System.IO;
namespace Sample
{
public class Company
{
List<Book> books;
[XmlElement(ElementName = "Book")]
public List<Book> Books
 ......
2008 Sep 27
9 of 174 | WMRM SDK 10.1.2 best practice sample code - I wrote this sample code a while back to show how to validate the latest individualization version when using predelivery. Here are a few tricks that you need to do to make this work. Namely, you need to parse the “ClientInfo” XML fragment the hard way. This sample code shows you how to do just that. The documentation below is a complete walkthrough of the code but the code is also well documented. This is a great place to start if you are trying to do WM DRM predelivery form ASP.net. Keep in mind that this code will only work with the WMRM SDK version 10.1.2 or better. Older versions of the SDK may not work as expected. If you have an older version of the SDK you may need to modify the cod......
2008 Sep 04
10 of 174 | Getting Better Time Formats -
Orcas introduced a new DateTimeOffset class that is easier to use for representing absolute times than the original DateTime class. However, if you run svcutil on a contract that contains a DateTimeOffset, you'll get an ugly generated structure because DateTimeOffset isn’t recognized as a natively supported type by the system. A new class is generated by svcutil to match the schema for DateTimeOffset in the metadata.
namespace System
{
using System.Runtime.Serialization;
[DebuggerStepThroughAttribute()]
[GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
[DataContractAttribute(Name="DateTimeOffset", Namespace="http://schemas.datacontract.org/2......
2008 Sep 02
11 of 174 | Serialize an Object Instance to XML - To serialize an object instance to XML, you need to use the XMLSerializer Class's Serialize method....
2008 Aug 29
12 of 174 | PowerShell – Base64 Encode/Decode a string - An easy way to convert data to/from base64 (or uuencode/uudecode, quoted-printable, url encode/url decode, JIS, Yenc, hex, or even creating md5 or sha1 hashes) is to use the NetCmdlets convert-data cmdlet. To encode: PS C:\> convert-data -data "Hello, World!" -to base64
Data Size Format
---- ---- ------
SGVsbG8sIFdvcmxkIQ== 20 base64
To decode:
PS C:\> convert-data -data $encoded.Data data -from base64
Data Size Format
---- ......
13 of 174 | XFDF XML mit C# und einem Schema validieren ... -
In meinen letzten Blogseintrag "XFDF Felder mit C# lesen ..." habe ich über meine ersten Erfahrungen mit XFDF berichtet. Das Projekt schreitet voran und ich habe noch einige interessante Dinge XFDF mit .NET und Visual Studio 2008 zu berichten.
Um die eingegangen XML XFDF Daten sinnvoll zu verarbeiten, wollte ich mit folgendem Code die XML Daten mit dem offiziellen XSD Schema von Adobes Website validieren.
try
{
// Create a schema set......
14 of 174 | XmlSerialization to generate and consume XML - I want to talk about Xml Serialization this month. One of the work I was involved in recently required generation of XML and a I came across this wonderful technology which helps you generate and consume XML seamlessly.
If you are generating XML in a clumsy way using printf containing the XML tags, I would strongly suggest you to look into this technology. Incidetaly this plays well with Linq too. The XML after it is loaded into the object can be parsed with Linq queries. I will write a sample for that soon.
using System;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Serialization;
namespace Sample
{
public cl......
2008 Aug 28
15 of 174 | Serialization using XElements - Introduction
I recently starting fooling around with the new XML LinQ stuff in .Net, and it is very impressive. One thing that I found missing was the ability to serialize objects directly into XElements. However, Microsoft did provide the means to get me to hit the ground running and it took a couple of minutes for me to get it right.
Readers and Writers
One thing the classical .Net XML always lacked was an "XmlNodeWriter", a writer that basically allows you to create DOM XML nodes using a standard XmlWriter. There are several implementations, but they can only insert nodes into a document (or a node within that document).
Microsoft has now filled that gap with the XNode.CreateReader()......
2008 Aug 25
16 of 174 | XFDF Felder mi C# lesen ... - Adobe Forms Dokumente werden in verschiedenen Anwendungsfällen verwendet und es ist nicht unwahrscheinlich, dass man in einer Anwendung Daten aus solch einem Dokument übernehmen muss.
Adobe Forms können ihre Daten als FDF oder XFDF exportieren. Zum FDF Format gibt es ein Software SDK von Adobe. Liegen die Formsdaten als XFDF (= XML Forms Data Format) vor kann man die Daten mit Standard .NET Mitteln aus dem .XFDF File lesen, da es sich um eine XML Datei handelt. Die Grundstruktur jedes .XFDF Files sieht so aus und ist auch über ein Schema beschrieben.
<?xml version="1.0" encoding="UTF-8"?>
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
<f href="C......
2008 Aug 19
17 of 174 | Serializable XmlDocument - It's surprising that XmlDocument isn't marked [Serializable], because it's very natural to serialize one into a stream. I wanted to put an object into ASP.NET ViewState the other day, and quickly ran into this roadblock, because part of the object included an XmlDocument, which is not serializable. A quick search revealed that most people deal with this problem by storing a string instead. Indeed, that was where I started, but I quickly realized that there are multiple places in my code where I want to do this sort of thing, and I don't want to have to mess with it in each data structure that contains an XmlDocument.
So I put together a simple class that holds an XmlDocumen......
2008 Aug 02
18 of 174 | Silverlight Cream for August 1, 2008 -- #340 - Denislav Savkov with a selection helper class, Mark Monster with SL Tag Cloud, Mike Taulty on asmx web services, Jesse Liberty on Page switching and his new SL book with Tim Heuer, and Martin Grayson on panels.
From SilverlightCream.com: Tip: Easy/Reusable selection with ISelectable and SelectionManager Denislav Savkov submitted this quick tip of a helper class, to assist in selection process. All the code plus examples on the blog! Creating a Silverlight TagCloud UserControl I guess it's my own fault for not doing it, but a Silverlight TagCloud has been on my ToDo list... Mark did one, and is giving up the code... very cool, Mark... and thanks :) Silverlight 2 Beta 2 - ASMX Services &a......
2008 Jul 31
19 of 174 | Creating shared types with SvcUtil against multiple sources - One of the teams I am working with ran into an issue when generating shared types via SvcUtil. The issue was SvcUtil was generating multiple types (e.g., classes, enums) in the proxy .cs file. After a google search, I found this was being experienced by others:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=745657&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1392697&SiteID=1
An example of the duplicate types:
[System.CodeDom.Compiler.
GeneratedCodeAttribute("svcutil", "3.0.3906.22")]
[System.
SerializableAttribute()]
[System.Xml.Serialization.
XmlTy......
2008 Jul 26
20 of 174 | Protecting Content Passed From Web Services - Recently, I got called in to help a developer who had an issue where he was using the Infragistics HTMLWebEditor control to allow users to submit content. Many of the users copy and paste code from Word into the editor. For those in the web development industry we all know that Word's HTML is not your typical HTML. The issue the developer ended up having was that certain characters were being saved to the database and when passed back to the front end from his web service they were causing XML validation errors because symbols were not being properly escaped. Regardless of whether HTML should be saved to the database or not, the developer needed a solution quickly so that the users coul......
2008 Jul 25
21 of 174 | Testing OracleException - In the application I've been working on, we have the requirement to handle unique constraint errors gracefully. It wasn't really hard, I just had to check for OracleException.Code == 1. The trick was the testing. Testing a unique constraint error was not a problem. The issue is verifying that other exceptions are bubbled up properly.
The basic exception handling code is like this:
1 protected bool HasUniqueConstraintError( Action databaseAction )
2 {
3 try
4 {
5 databaseAction();
6 return false;
7 }
8 catch( OracleException ex )
9 {
10 //Return false if exception is a Unique Constraint erro......
2008 Jun 02
22 of 174 | 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
23 of 174 | ???????? 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
24 of 174 | 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
25 of 174 | 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
26 of 174 | 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
27 of 174 | 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
28 of 174 | 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
29 of 174 | 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
30 of 174 | 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
31 of 174 | 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......
32 of 174 | The Performance Woe of Binary XML - Analysis on why binary XML doesn't solve the real issue of XML performance...
2008 Mar 11
33 of 174 | 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
34 of 174 | 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
35 of 174 | ??: .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
36 of 174 | The Performance Woe of Binary XML - Analysis on Why Binary XML doesn't solve the real issue of XML performance...
37 of 174 | 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
38 of 174 | "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
39 of 174 | 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
40 of 174 | 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
41 of 174 | 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
42 of 174 | 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
43 of 174 | [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
44 of 174 | 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
45 of 174 | 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
46 of 174 | Base64 Encoding And Decoding - Base64 coding/decoding for native C++ and customized coding for C++/CLI...
2008 Jan 04
47 of 174 | 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
48 of 174 | 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
49 of 174 | 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 ......
50 of 174 | 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 thre