Format String for XML Value

No Comments »

Of course you know that XML denotes element names with greater-than and less-than symbols, such as:

<name>value</name>

Therefore, to avoid confusing the XML parser, the greater/less symbols (and the ampersand, an HTML special character) must be encoded.

Read the rest of this entry »

Executing Code in Partial Trust Environments

5 Comments »

When building your first .NET web service, you may be in for a rude awakening when you discover the concept of “partial trust.” Your previously bullet-proof code will suddenly fail in a flurry of exceptions thrown by seemingly innocuous commands such as reading files or accessing the Registry. This article provides a brief overview of Code Access Security and describes how to modify and test your code to work in a partial trust environment.
Read the rest of this entry »

Best C# Web Sites

9 Comments »

Recently I posted a list of the Best C# Blogs. Today we recognize the best C# Web sites.

Following (in alphabetical order) are the best C# sites active on the Web today. Also included is the “About” section of the site (edited for space and clarity). Please comment if you can recommend other excellent C# web sites that didn’t make my list.

Read the rest of this entry »

Read a Web Page in C#

2 Comments »

Reading the contents of a web page is easy in C# with the System.Net.WebClient class:

Read the rest of this entry »

Determine Installed .NET Versions from a Web Page

2 Comments »

You can use the following JavaScript code in a web page to determine which versions of .NET are installed on a client PC:

Read the rest of this entry »