Suppress “A first chance exception of type” Messages in VS 2005

When writing an API framework, it’s good practice to throw appropriate framework exceptions. I have several extended application exceptions in my rule engine framework. When executing all unit tests, or just stepping through the development code, I would see hundred of messages in Visual Studio of ‘A first chance exception of type’ …
This is just perfect behavior from my development point of view. I’m throwing these exceptions myself from the framework. I’ve made several attempts to find how to disable these messages. And finally I found the answer on Peter Macej blog:

How To Disable “A first chance exception of type” Messages in VS 2005

It was just a simple context menu option on the Output window: Uncheck the ‘Exception Messages’.

I was always trying to do this somewhere in the Debug \ Exceptions form. Well I’m glad I found it. It makes the Output windows trace less convoluted with irrelevant messages.

Create SQL Receive Locations Programmatically.

One of our recent projects involved creating an orchestration, which was bound to a physical one way receive port polling data from SQL server.  There will be multiple SQL receive locations for the same receive port. The receive locations will have different polling conditions based on the customer. Our requirement was to create one receive location per customer. So, we’ll be adding more SQL receive locations as the customer base increases.  For that reason I created this function (part of a bigger client application) which create SQL receive location programmatically, which uses BizTalk Catalogue explorer object (no WMI). Hope this will be helpful to some one, because there is minor things to take care of.

 
You can download the .CS file from here.
 
The below figure shows a SQL receive location created with help of the above function.

How To Execute it:

Here is the sample code, which is used to run the function.

string server “SK_WORKSTATION”;
string 
database “ORDER_POLLING”;
string 
address “SQL://” + server + “/” + database + “/” + Guid.NewGuid().ToString();

CreateAndConfigureSQLReceiveLocation(
  
“Receive.SQL.Autogenerated.SK1”
“Receive.Sch.Orders.Internal.SQL.1Way.AllPollingService.ActivationMessages”
, address
“False”
“Minutes”
“10”
“DocumentRootElement”
“http://www.digitaldeposit.net/samples/SQL/schema”
“exec [GetSQLActivationMessage] @AccountNumber=’007′”
“Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=sa;Initial Catalog=ORDER_POLLING;Data Source=SK_WORKSTATION”
“Data Source=(local);Initial Catalog=BiztalkMgmtDb;Integrated Security=true;Trusted_Connection=True”
);

NOTE: The function assumes you already got a “Receive Port” (which you pass as second argument to the function), but its not hard to create it inside the function.

Nandri!
Saravana

Great Bits of WSS 3.0 Code

Great Bits of WSS 3.0 Code

I stumbled upon some nice bits of misc. WSS code here.  A theme changer, a master page that clearly shows the different content placeholders, a log viewer, a contact list with presence information.  Gold!  Gotdotnet code gallery is getting phased out soon so I might have to update the link:


http://www.gotdotnet.com/codegallery/codegallery.aspx?id=5b7f6988-5e72-46df-bb45-ca01ea08825a

Pretty Clever for a Friday 1-Click

(some clever people about……so THAT’s how it works!)

Ever wondered how the Arrow/Pointer/Cursor works?

The mystery is finally solved.

How does the small arrow on your computer monitor work when you move
the mouse?  Haven’t you ever wondered how it works?

Now, through the miracle of high technology, we can see how it is done.

With the aid of a screen magnifying lens, the mechanism becomes apparent.

Click on the link below and you will find out. The image may take a
minute or two to download and when it appears, slowly move your mouse
over the light grey circle and you will see how the magic works.

(you do need flash plugin/player 🙂

award.swf
(3.82 MB)

Evektor SportStar check out

I recently got checked out in Evektor SportStar. It's a two seat Czech built light sport airplane that becoming increasingly popular with the new sport pilot rules. I've been wanting to try it out for a long time but it's so popular that's always busy flying and booked well ahead. Apparently, many jumped on the sport pilot bandwagon as it's cheaper and faster way to get up in the air. At the same time some folks saving money during regular private pilot training as SportStar's hourly rental rate is lower than Cessna 172 and comparable to Cessna 150/152.

The preflight is simple and includes all typical checkpoints for 2-4 seat trainer airplane. The geared liquid cooled engine adds checking coolant level step. During preflight I noticed good quality construction and excellent fit and finish. The cockpit has adequate shoulder room and bubble canopy has plenty of headroom for over 6' pilot. In Texas heat though this greenhouse will fry you in no time, so keep it open as long as possible. Seats are firm and comfortable all controls are laid out well and within hands reach. Manual flaps extension handle is between seats and flaps position can be verified by the handle position only as the flaps are not visible due to wing design. Headset jacks located on the panel behind the seats and slightly to the right which all makes favorable condition for tangling headset wires with 5-point seatbelt harness.

Starting engine is very simple and once it's on there's only one throttle handle to operate, no mixture here. The vernier throttle control is something to get used to after Cessna's plunger type. I always wondered why all aircraft have such different user interfaces: panel layouts, control levers, switches grouping and locations etc. Why don't they create a few standards for critical controls. It would make pilot transition into new cockpits much easier and reduce workload especially during critical situations when motor reactions kick in. Anyways, the vernier lever must be twisted to smoothly adjust engine RPM (clockwise to increase ) and for abrupt changes can be moved back and forth after releasing the lock button. Exactly as mixture control in Cessnas. The spring that pushes throttle in is pretty strong and engine response is quick, so be on your toes. And we complain about confusing UI in software. 🙂

Take-off roll is pretty easy, it doesn't require as much right rudder input as 172. Also, nose wheel is connected with rudder by rods so it's very sensitive comparing to mushiness of Cessnas. That makes one more transition gotcha from Cessna as you don't expect it react so quickly and can start yawing left and right during take-off roll (I did). The secret is in quick smaller rudder inputs. Once at rotation speed it will lift off itself with just a hint of back pressure on the stick.

Once in the air – it's fun. The visibility is outstanding: high seating position, low cut sides, small engine cowl and all around glass canopy makes you like flying in the soap bubble. Steep turns are easy and stalls are non-event  –  it just mushing around and sinks without noticeable wing drop tendency. No stall warning though, so watch your airspeed. Speaking of which it was about 40 kts when it decided to stall and for cruise I observed 95kts at 4500 rpm. I wish it had better radios, they suck in this airplane, constantly picking interference from TV towers or some other sources. Old Cessna's radios don't do that.

Landing was where I had most difficulties. The light weight makes it even less stable in turbulence than Cessna 150. And after 172 I had a tendency to overcontrol because of it's quick response. The throttle handle didn't help either and I was behind in making small power corrections. Also geared engine RPMs are not the same numbers as for direct drive motors. It was hard to find right power setting first times on the approach. Flaring is easy as long as you get new sight picture. The rollout was tricky as remember it's high sensitive directly connected nose wheel –  it can easily lead into pilot induced oscillation. Crosswind landing is different too as SportStar has a little wing clearance that limits the amount of allowed wing drop in a slip. So it's essentially dictates crab all the way to touchdown and kick-in the rudder in the last moment approach. Once rolling on mains keep the nose wheel off and don't forget to straighten it before it touches runway – it can take you to the boonies.

Once all of this trouble spots have been addressed the fun begins. It's nice vroom-vroom airplane for sightseeing and local trips. Makes a good trainer too I guess. It's new, comfortable, responsive, looks great in the air and on the ramp and easier on wallet build time (5gph fuel flow). It's good to see FBOs coming to understand the value of light sport planes and hope it will keep flying affordable.

Output custom formatted message from Orchestration.

Have you ever wanted to create a custom formatted message. For example if you define a message of type System.String inside your orchestration and output it via an adapter the result will be as shown below

<?xml version=”1.0″ ?>
<string>Hello there</string>

this is because of the default serialization behavior of .NET base types within BizTalk. If in case you wanted to output the message as a simple string, in our case “Hello there” without any xml tags and processing instruction, you need to create your own .NET type with custom serialization and use it instead of System.String . In this post I’ll explain how you can achieve this seamlessly with a similar sample by creating your own class with your own custom formatting serialization technique to create a sample email text message from an XML message. The sample solution contains full working sample and the code is self explanatory.

Orchestration:

We got a simple orchestration which takes an input XML message and produces the output in text format.

 

MSG_TEXT_EMAIL  is a message created from a custom .NET class called FormattedTextEmail.

The message assignment shape got the following one line code, which assigns a .NET type to the Orchestration XLang message MSG_TEXT_EMAIL.

MSG_TEXT_EMAIL = new FormattedEmail.FormattedTextEmail(MSG_XML_EMAIL.From, MSG_XML_EMAIL.To,MSG_XML_EMAIL.Subject, MSG_XML_EMAIL.Body);

As you can see there is no MAP’s involved to do the transformation.

Input:

<ns0:EmailMessage xmlns:ns0=”http://www.digitaldeposit.net/sample/schema”>
  
<From>sk@email.com</From>
  
<To>gow@biz.com</To>
  
<Subject>Hey are you alrigh</Subject>
  
<Body>I found this sample really cool</Body>
</ns0:EmailMessage>

Output:

From : sk@email.com
To : gow@biz.com
Subject : Hey are you alrigh
Body : I found this sample really cool

Download Sample: CustomEmailFormat

Executing the sample:

1. Extract the solution to C:\BTSSamples

2. Open the visual studio solution, build and deploy it

3. Open BizTalk administration console, Open application “CustomEmailFormat”,  Bind orchestration and Start the application

4. Drop the sample message inside the folder “C:\BTSSamples\CustomEmailFormat\FileDrop\In”

5. You should see the text output inside the folder “C:\BTSSamples\CustomEmailFormat\FileDrop\Out”

Related Reading:

http://msdn2.microsoft.com/en-us/library/bb418739.aspx

Nandri!

Saravana

Can’t see Debug statements in DebugView?

First of all to see debug statements inside DebugView you need to compile your assemblies in “Debug” mode. For optimization reasons if you compile your assemblies in “Release” mode all the System.Diagnostics.Debug.WriteLine statements will be ignored by the compiler and you won’t see any output in the DebugView.

When it comes to BizTalk project sometimes even though the tool bar will say the build is “Debug” as shown in the figure

 

When you actually look into the properties of the BizTalk project it may be configured for “Deployment”, which is equivalent to the “Release” build and it won’t emit any debug symbols.

So, in this case you need to set the configuration to “Development”, which is equivalent to “Debug” build.

Nandri!

Saravana

NZ Selection Panel Announced for Full Code Press

I see on Tuesday that the NZ selection panel for Full Code Press was announced.

It is good to see Rowan doing some volunteer work now that he is working part-time.

I was going to bitch and moan that all the judges were based in Wellington then I saw that Che is on the panel. Che made the fine choice to move to Auckland from Wellington some years ago 😉

It is scary what you can find out about people of the Interweb… aparently Che was born on the 21st June 1972, he studied at the Wanganui Polytechnic School of Design and hates the nickname “toy-boy”. I wonder in Che ever met his mentor Clement Mok? Clement presented at MIX in Vegas this month 😉