Firstly thanks to everyone that attended the workshop. It was great. Any feedback or questions are welcome.

The PowerPoint presentation is available at http://dl.dropbox.com/u/4406115/Html5.pptx

Keep a watch on my blog as I’m going to start a whole series of Html 5 where I will go a bit deeper into each new feature. I will create a sample site and use as much of the new Html 5 spec.

Cheerio!

By now everybody knows that Microsoft BizTalk 2010 is available. In this blog entry I will give a summary of information to get started with BizTalk 2010. Here are the steps:
Get BizTalk 2010 Developer edition
The developer edition is completely free to use for development, demo and testing.
Get BizTalk Adapters
The BizTalk Adapters are used to easily send and receive message from Oracle eBusiness Suite, SQL Server, Oracle Database, mySAP Business Suite and Siebel eBusiness Applications.
Get BizTalk 2010 Documentation
This is all the documentation that you will need to learn and go deeper into the BizTalk 2010 technology.
Get BizTalk 2010 Training Kit
This is probably one of the most important downloads to get started to learn about the new features in BizTalk 2010.
View BizTalk Server Developer Center
Bookmark this site and keep a close eye on this site for all new information about BizTalk.

This should be more than enough to get you started with BizTalk Server 2010. There is allot more to learn about BizTalk, but this will be a good starting point.
Cheerio!

This entry is just a summary about info I could find about BizTalk 2010.

Speculation about the release seems to be on 14/11/2010.

New set of posters and their details from the websites:

BizTalk Server 2010 BAM Poster

This poster provides an overview of the entire BAM life cycle. It depicts the design of the observation model by the business analyst, mapping the observation model to the implementation by the developer, deployment by the system administrator, and the presentation channels for business end users. Both new and experienced users will better understand the concepts, processes, and management of BAM. The poster is intended to be printed and measures 26”x28”.

BizTalk Server 2010 Runtime Architecture Poster

The poster depicts the modules and components of a BizTalk Server 2010 runtime environment, including message flow, data flow, and references that occur at runtime. It can be used to show how the capabilities listed in the BizTalk Server 2010 Capabilities Poster are actually implemented. The poster is intended to be printed and measures 35”x32”.

BizTalk Server 2010 Capabilities Poster

This poster lists the BizTalk Server 2010 capabilities bucketed in eight categories and is designed to enable technical discussions by providing both high-level and detailed views of the capabilities and features that are included. The poster has been updated to include new features and capabilities, including enhancements to RFID, BizTalk Adapter Pack, EDI, AS2, and better integration with Visual Studio and Windows Server. The poster is intended to be printed and measures 30.5”x28”.

BizTalk Server 2010 Scale-out Configurations Poster

This poster describes typical scenarios and commonly used options for scaling out BizTalk Server 2010 physical configurations. It illustrates how to scale out to achieve high availability through load balancing and fault tolerance and how to configure for high-throughput scenarios. The poster is intended for use by IT professionals and developers who need to design, deploy, and manage large-scale implementations of BizTalk Server 2010. The poster is intended to be printed and measures  26”x38”.

BizTalk Server 2010 ESB Toolkit Architecture Poster

This poster depicts the architecture of the BizTalk ESB Toolkit. It shows the toolkit's core components, and how these integrate with BizTalk Server. The poster is intended to be printed, and measures 26”x28”.

BizTalk Server 2010 Database Infrastructure Poster

This poster describes BizTalk Server 2010 databases and associated components, jobs, services, UI, and events. It includes tables that describe the databases and jobs. It is intended primarily for DBAs and administrators of a BizTalk Server environment, yet it also serves as an introduction to the infrastructure for all users. The poster is intended to be printed and measures 28”x30”.

Enjoy!

This entry is just an extension to the blog Memory Dump to the Rescue by Bruno Marques. In he’s blog he shows how to generate a mini dump on a exception in code. Please read he’s blog first. If you want to use this in ASP .Net MVC you could take the same approach:

  1: [HttpGet]
  2: public ActionResult Crash()
  3: {
  4:     try
  5:     {
  6:        // compiler doesn't allow division by a zero constant,
  7:        // so we have to use an auxiliary variable
  8:        int zero = 0;
  9:        int value = 123456789 / zero;
 10:     }
 11:     catch (Exception)
 12:     {
 13:        string path = Path.Combine(HttpRuntime.AppDomainAppPath, @"App_Data\Dumps\");
 14:        string fileName = string.Concat(path, Process.GetCurrentProcess().ProcessName, ".dmp");
 15:        MiniDump.WriteDump(fileName);
 16:     }
 17: 
 18:     return View();
 19: }

The first thing to note in the code is that I write the dump file to my App_Data folder under a sub folder named Dumps. This is a better approach for file and folder access rights in ASP .Net applications. I have a small issue with this approach. If I have to insert all this code to write a dump file in all my actions then my code will become very cluttered and maintenance of the code becomes difficult.


The Better Approach


All developers that have developed with ASP.Net MVC know of the Attribute [HandleError] that you can put on top of your controllers. With this we can create our own custom attribute to handle the error and create a mini dump file for the application.


Here is the custom attribute code:

  1: [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
  2:  public class DumpHandleError : HandleErrorAttribute
  3:  {
  4:     public override void OnException(ExceptionContext filterContext)
  5:     {
  6:         string path = Path.Combine(HttpRuntime.AppDomainAppPath, @"App_Data\Dumps\");
  7:         string fileName = string.Concat(path, Process.GetCurrentProcess().ProcessName, ".dmp");
  8:         MiniDump.WriteDump(fileName);
  9: 
 10:         base.OnException(filterContext);
 11:     }
 12: }

Now I can cleanup my controller code as follow:

  1: namespace DumpMvcApplication.Controllers
  2: {
  3:     [DumpHandleError]
  4:     public class HomeController : Controller
  5:     {
  6:         [HttpGet]
  7:         public ActionResult Index()
  8:         {
  9:             ViewData["Message"] = "Welcome to ASP.NET MVC!";
 10: 
 11:             return View();
 12:         }
 13: 
 14:         [HttpGet]
 15:         public ActionResult Crash()
 16:         {
 17:             // compiler doesn't allow division by a zero constant,
 18:             // so we have to use an auxiliary variable
 19:             int zero = 0;
 20:             int value = 123456789 / zero;
 21: 
 22:             return View();
 23:         }
 24:     }
 25: }

All unhandled exceptions will be handled by my custom attribute to create a mini dump for the application.


Some additional tips is to create a abstract base controller with the attribute added and inherit other controllers from the base controller. Currently when the code creates a mini dump it will overwrite the dump file. If you want individual mini dumps for each exception I would recommend to add a DateTime.Now to the filename, but be aware that you have to cleanup your dumps else you might run out of disk space.


Hope this helps to ease your debugging experience for ASP .Net MVC applications.


Please comment and let me know on improvements that can be made to the code.


Cheerio!


I’m going to show you how to convert a raw WCF Soap Message to a Memory Stream.
Firstly here is the code:
1: [OperationContract(Action = "*")]
2: public void AddMessage(Message message)
3: {
4:   MessageBuffer buffer = message.CreateBufferedCopy(int.MaxValue);
5: 
6:   Stream stream = new MemoryStream();
7:   XmlWriterSettings settings = new XmlWriterSettings
8:                    {
9:                      Encoding = System.Text.Encoding.UTF8
10:                    };
11:   XmlWriter writer = XmlWriter.Create(stream, settings);
12: 
13:   //Create a copy of the message
14:   Message message = buffer.CreateMessage();
15: 
16:   //Serialize the message to the XmlWriter 
17:   if (writer != null)
18:   {
19:     message.WriteMessage(writer);
20:     writer.Flush();
21:   }
22: 
23:   stream.Flush();
24:   stream.Seek(0, SeekOrigin.Begin);
25: 
26:   // Save stream to database
27: }


The example above show a generic WCF method that accept any type of message. You might ask why do I ever want to do this? You might want to create a router service for your WCF services or you want to save a copy of a WCF message to a database. Working with an message stream provides allot of flexibility to work with the message contents.


Important points to note of the code is that I create a buffer copy of the original message. The reason is that the body of a message can only be accessed or written to once. If you want to access it more then once it is better to create a buffer copy of the message. From the buffer you can create multiple message instances. If you work with SOAP messages you need to specify the XmlWriterSettings Encoding to UTF8. Otherwise your stream data will become corrupt from the original message structure. Last note is when you create a stream to always flush and move the stream pointer to the beginning of the stream.


Hope this helps and any feedback is welcome.


Cheerio!

Disqus