Tag Archive for '.net'
Page 2 of 2
Miguel links to a couple of interesting articles from MSDN about practical considerations when it comes to parrallel progamming.
We do lots of loop iteration operations at work which could be highly optimsied on multi-core machines using the parrallel approaches available in recent .Net frameworks, so this info comes in handy.

So a little late but news that Mono has released it’s 2.0 version, with C# 3.0 compiler support and ASP.Net 2.0 as well as a whole hole host of additional dataproviders and the really cool Mono.Addins framework (for writing apps with addins in them) and Mono.Cecil (non System.Reflection based bytecode manipulator). Also in this release, finally, is a decent Mono Debugger.
As read on Scott Gu’s Blog, jQuery to be shipped with ASP.Net.
Fantastic news. One of the most annoying things of working in the ASP.Net world has been the lack of ability to use and stay up-to-date with cool community driven technologies. Chosing to use jQuery instead of re-inventing the wheel is a great decision for everyone. And just to make it that little bit better, they are shipping it with intellisense for VS.
Miguel from the mono project does it again: A 100% managed command prompt library to help us build windows console apps that behave almost as well as those in the unix world.
So in reference to my previous post, I finally found a way to extract the queue length of an MSMQ Queue behind a clustered server, and it involves, of all things, COM. There doesn’t seem to be any other non-hackish way to get a queue length fast from a clustered server, the links discussed in my previous post work fine for non clustered environments, but this is the solution for a clustered environment.
- First:
Add a COM Reference to the Microsoft Message Object 3.0 Type Library (if on Windows XP or Server 2003).If you’re stuck on vista then manually browse to C:\windows\system32\mqoa.dll and add that as a reference. - Second:
Use the following code and pay special attention to the format of the FormatName parameter and the server parameter. It took me a long time of fiddling with string formats to get the correct one and no one else on the lazy web seems to have mentioned the specific format needed.
int queueCount;
MSMQ.MSMQManagement mgmt = new MSMQ.MSMQManagement();
object oMissing = Type.Missing;
object server = (object) "MSMQServer";
object formatName = (object) "Direct=OS:MSMQServer\private$\queueName";
mgmt.Init(ref server, ref oMissing, ref formatName);
Console.WriteLine("response " + mgmt.MessageCount.ToString() + Environment.NewLine);
int.TryParse(mgmt.MessageCount.ToString(), out queueCount);
Apologies for the bad vertical spacing, wordpress keeps on insisting on closing my <code> section early if I insert empty newlines in it.
Watch out, a coding related post.
So I coded up a little MSMQ dumping utility the other day, in part to learn about MSMQ and in part to pick up some domain knowledge around one of the more fragile systems at work. And before you start laughing, yes I know it’s been over 3 years since I wrote a real app, but anyhow I gave it a crack.
Coded the utility up in about four hours, including time to acquire domain knowledge and MSMQ knowledge and ended up with this app:
Now this thing works perfectly on the staging machine, but refuses to return the Queue Count on the live server. Enter the MSMQ from the plumber’s mate blog. Full of lots of little handy hints on how to make MSMQ performance counters actually work.
Why can MSMQ installs get so broken, so often, that an MSMQ blogger can have so much material to talk about when fixing it? I don’t know if I should be happy I found a plentiful source for potential solutions, or worried about the many ways a seemingly simple operation can go wrong?
Miguel posts an interesting blog on cross platform stand alone silverlight. As Miguel points out there was already a way to do this with Moonlight on linux, but not on windows.
Using a Windows.Forms.WebControl to embed a sliverlight control is trivial approach to doing this. But Tamir has gone to the effort of wiring it all up for you now which is great. His approach also runs a HttpListener in a separate thread to enable the silverlight control to dispatch requests back and forth.
Miguel tells us of pash. I was interested in this back when it was called Monad Shell, but never really got into it. The good thing about pash though is that it’s relatively cross platform (Linux, MacOSX, Windows and even WindowsCE). Might have to have another look at it.
Update: Apparently pash is still at the stage where it’s an open source re-implementation of Monad Shell and not quite a Power Shell replacement… yet.

Recent Comments