DonXML Blog

The East Coast Don

November 2003 - Posts

Lessons Learned

When using a COM component created by a company known for their great cross platform statistics software, but not known for their Windows expertise, creates a COM component and sets the component’s threading model to both (STA and MTA models), don’t trust it.  If said component was developed for and tested against VB 6.0 and you are using .Net, don’t trust that it can handle MTA, even though their sample .Net code never checks to make sure it is running on STA thread.  And if you are really foolish enough to try to use this component in a multithreaded service, and it works “almost” all the time, but occasionally hangs all threads in the process, the first thing you should do is make sure all threads that call the component have their ApartmentState set to STA.  Then make sure that the wrapper dll that you wrote to make life easier to deal with this crazy component checks the thread’s ApartmentState, and throws an error if it isn’t STA.

Life would be so much easier if I trusted my instincts instead of the documentation.

DonXML Demsak


 The preceding blog entry has been syndicated from the DonXML Demsak’s All Things Techie Blog.  Please post all comments on the original post, and not this one.

Posted: Nov 25 2003, 06:54 PM by DonXML
Filed under:
When Good Programs Go Bad

Ahhhhh!  I hate it when good programs go bad.  As you can probably tell from the lack of good quality posts lately, I’ve been busy with work.  At my client, we are at the end of our development cycle, and getting ready for formal testing (thanks to all the FDA requirements it takes about 3 times as long as it should).  Everything was looking good except for the most complicated piece of code (which of course is mine).  Basically, I wrote a .Net data provider for SAS, and placed that in my Data Access Layer.  I re-engineered the Async Application block to work with my Line of Business code (and removed all the SQL Server stuff), which calls my Data Access Layer which calls either the Oracle Provider or my SAS provider.  The .Net SAS provider calls a COM dll (provided by SAS) via COM interop, and the COM component talks to a Unix box via a TCP/IP.  Lots of places for things to go wrong, and unfortunately, something does go wrong occasionally (but not always).  I can’t see to track down exactly what goes wrong, but the net result is sometimes a worker thread makes a call to the SAS server, (via the SAS provider and the COM component) and it never stops waiting for a response.  I can check the SAS process on the Unix box, and it says it has completed and is closing the connection, but either the COM component never gets the close message, or the COM interop never fires the complete event (or even the error event).  We have all sorts of network issues, so it could be a network issue, so I’ve got to do some network sniffing.  Or, it could be COM interop causing the problems.  I thought it could be a multi-threading issue, but I still get the problem occasionally when single threaded.

I’ve got until next Wed. to figure this one out, so it looks like I’ll be busy for a while.

DonXML


 The preceding blog entry has been syndicated from the DonXML Demsak’s All Things Techie Blog.  Please post all comments on the original post, and not this one.


 

Posted: Nov 20 2003, 09:45 PM by DonXML
Filed under:
N3UG Meeting Tonight Featuring Andrew Brust and Other NJ User Group News

Before I forget to blog about it, Andrew Brust will be speaking on ADO.Net and XML at the N3UG (that’s the North New Jersey .Net User Group) meeting tonight at 6:00PM.  This event is sponsored by the great folks at INETA

Also, if you live in Central/South New Jersey, and are tired of having to drive up to North NJ for user groups, Jason Beres and the folks from Infragistics are working on bringing a .Net user group to your neck of the woods.  Keep an eye on Jason’s blog for more details.

DonXML

Posted: Nov 11 2003, 11:24 AM by DonXML
Filed under:
Pocket PC Blogging App

I haven't seen this mentioned yet, so I thought I'd give it a referenceJim Blizzard has a Pocket PC Blogging app and has put it up on GDN Workspaces.  If you are into blogging from your Pocket PC, I'd suggest checking it out.  Plus it uses the .Text Web Services (of course).

DonXML

Posted: Nov 07 2003, 10:13 PM by DonXML
Filed under:
NJMSDEV Meeting – Thursday November 6th

Just a reminder, the November NJMSDEV meeting is tomorrow, Thursday the 6th at 5:30PM.  The topics will be:


Sharepoint Portal Server 2003
There's a new Sharepoint portal server out there.  This presentation covers the new features and how it uses .NET.  It's also covers Sharepoint Services, a new set of features built into Windows 2003 server. 

Infopath Overview
One of the newest products in Microsoft Office 2003.  What's it do, what's it really good at and what it's not.

DonXML

Posted: Nov 05 2003, 02:07 PM by DonXML
Filed under:
New Blogging Home

I finally got .Text up and running as my CMS on my home page and that's where the majority of my posts will be from now on.  I'm not totally leaving weblogs.asp.net , but I will only post  pure .Net stuff here.  Stuff  like SVG, XML, Longhorn, PDC, and various non-tech topics will only be found on my home page.  The idea is to try to help reduce the noise from weblogs.asp.net, and have the freedom to post “offtopic” stuff as I wish.  Only the front page is skinned to me new style (and that isn't even totally complete yet).  The individual category pages still use the default .Text styles.

I've used the multi-blog aspects of .Text to separate my stuff into major categories, and then each category has sub-categories.  This way you can better control what type of post you subscribe to.

Within the next couple days I should have an update to .Text that will enable you to pull in a RSS feed from another site (say weblogs.asp.net or longhornblogs.com) and automatically update your personal blog site.  This is the exact opposite of Clemens push feature in Das Blog.

DonXML

Posted: Nov 03 2003, 10:29 PM by DonXML | with 1 comment(s)
Filed under:
Longhorn Tweaking Guide!

Sam Gentile found a great resource to help fix some bugs and get Longhorn to run faster.

DonXML

Posted: Nov 02 2003, 01:31 PM by DonXML | with 2 comment(s)
Filed under:
More Posts