Regional Director Code Samples

Microsoft Regional Directors specialize in creating crafty shortcuts and ingenious innovations for developing with the .NET Framework. Check out some recent tricks of the trade here-and contact an RD if you want to learn more.

Regional Director Code Samples

Plumbwork Orange: Bringing WS-* implementations to the masses

RDs: John Bristowe and Christian Weyer. Abstract info:
A workspace created by plumbers, for plumbers. Its purpose is to provide implementations of specifications like WS-Eventing and WS-MetadataExchange, while providing support libraries for things such as WS-Policy document parsing. Bringing a number of important and must-have implementations from the WSA (Web services Architecture) to the WSE 2.0 runtime - this is our goal.

WsContractFirst: A Visual Studio .NET Add-In for improved "Contract First"
RDs: Christian Weyer
Ever wanted to simply right-click on a WSDL file in Visual Studio .NET and generate code from that Web Service contract? Now you can -whether it be a client-side proxy class or a server-side stub skeleton. The WsContractFirst Add-In automatically determines the project's programming language and generates source code. With this little tool the vision of creating and designing the interface and message of a Web service first and then generate code from it comes a little bit closer.
DynWsLib: Dynamically invoke XML Web Services
RDs: Christian Weyer
Have you ever thought of invoking your XML Web Services dynamically without having to generate a client-side proxy class at design/compile time with wsdl.exe or Visual Studio .NET? No need to know the exact Web Service description and endpoint at compile/design time. Just get your WSDL from UDDI (or from wherever you want, e.g. XMethods), specify the type to instantiate and the methods to call, and voila! This tool can be used from any .NET application or even an unmanaged resource - and is especially useful in testing scenarios.
GACUtils: Tool which comes in handy when developing ServicedComponents
RDs: Ralf Westphal
GACUtils is a small tool which comes in handy when developing ServicedComponents. It registers itself as a right-click command for *.DLL files and allows you to deploy/undeploy components from the GAC and to register/unregister them from COM+ catalog. It also gives you some more flexibility when importing components into the GAC, as it can modify VS.NET registry settings to include the deployed DLL in the "Add Reference/.NET Components" dialog.
Open Source .NET Remoting Projects
RDs: Ingo Rammer
These are some proof-of-concept implementations for the .NET Remoting runtime and its very powerful extensibility model. The sample channels, namely BidirectionalTcpChannel, JabberChannel, and SMTPChannel show that you can do some pretty useful and some weird things with this model. All the code is not meant for production use.
Polymorphism Debate Part III
Get the tips and snippets submitted to SearchVB.com that fueled the Visual Basic .NET Polymorphism debate.
HTML Content Parser
This project is an HTML Content Parser and is very popular, especially with students. It gets a stream of HTML content from a specified URL Web page, goes through the entire extracted stream, and picks out the HTML hyperlinks and images. It then displays them in an HTML table in a hyperlink format for users to click on directly. This is particularly helpful for users interested in images on Web sites, but find it tedious to look through multiple pages in a browser's Vew/Source to extract the images. The Information and Source Code relating to this project can be found here. The Source Code can also be downloaded here. Check out the live version of this project here.
SushiWiki V1-RC2
SushiWiki is a Wiki-like clone written in ASP.NET. It's an open source project (BSD license) with source code is available through SourceForge : https://sourceforge.net/projects/sushiwiki/
Polymorphism is a must in VB.NET
There was a recent tip published here entitled, "Polymorphism can lead to head scratching in VB.NET". It is important to stress that Visual Basic .NET is a fully compliant object-oriented programming (OOP) language, and thus OOP should be practiced at all times within .NET development, albeit with careful planning and design in order to not lose focus. In the previously mentioned tip, the author stressed that polymorphism can lead to nightmares and headaches. However, NOT implementing polymorphism can lead to worse nightmares and headaches, in terms of maintainance and extensibility. The above problem, as stated by the tip author, can essentially be solved with the Visual Basic .NET "MyClass" keyword.
The IDesign .NET Code Library
Juval Lowy spent four years developing this set of tools and utilities by using .NET technologies and educating the industry about them. The componentware downloads cover C# 1.1 and C# 2.0 programming, essential .NET concepts, .NET application frameworks 1.1 and 2.0, system issues and enterprise services. The utilities include productivity-enhancing tools and compensate for some oversight in the original design of .NET or its application frameworks.
Culture Demo

See this demo from the TechEd 2003 presentation, "Building International Applications with the .NET Framework". CultureDemo lists different attributes of all available cultures: name, calendars, number samples, date samples, regions, and more.

Custom ResourceReader
A sample implemenation of a custom ResourceReader to read resource information from the database, instead of using resource files or satellite assemblies. The second project implements a custom CultureInfo (EnterpriseCultureInfo) to make localization to Klingon and Vulcano possible.
TicTacToes for the Compact Framework
Here is a implementation of TicTacToe in C# for the .NET Compact Framework.
RemotingToolkit.Zip
A simple .NET Remoting configuration and Visual Basic .NET code demo with instructions for making any .NET DLL remotable via IIS using a binary formatter—a best-practice in most cases.
fnetschedule.Zip
Smart Device Application for the PocketPC written in Visual Basic .NET 2003 that accesses the Franklins.Net Class schedule through a public Web service, and lets the user scroll through descriptions and dates, as well as a location picture. Referenced in MSDN Magazine.
MailChecker.Zip
MailChecker is a DLL that lets you check the validity of an e-mail address by querying the mail server responsible for the e-mail address and asking it via SMTP if the e-mail is valid.
Expert One-on-One Visual Basic .NET Business Objects
NetRun - a utility to simplify no-touch deployment in .NET

NetRun is a utility that helps make no-touch deployment, or auto-deployment, work in .NET. This program can be installed on a client workstation, along with the .NET runtime, and can then be used to launch .NET programs from a URL. The .NET program will be automatically downloaded into a cache on the client machine and will run from there. Any dependant DLLs will also be automatically downloaded to the client machine. The program and DLLs will also automatically update when new versions are placed on the server. This version of NetRun is documented in Expert One-on-One Visual Basic .NET Business Objects. NetRun addresses the following issues you may encounter with no-touch deployment:

  • Dynamically setting security for deployed applications
  • Reading application configuration files from an ASP.NET server
  • Allows you to deserialize objects into autodeployed classes
  • Preventing the browser from popping up when running https://myserver/myroot/myapp.exe
TicTacToes
Here is a Windows Forms implementation of TacTacToe in C#, Visual Basic .NET, and J#. A great way to start experimenting with .NET and learn about the differences between the three major languages.