Sams .NET Stuff : All my .NET stuff
Updated: 8/5/2002; 11:08:08 PM.

 

Categories:
Personal Friends:

Subscribe to "Sams .NET Stuff" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 
 

Thursday, May 02, 2002

Replacing ADODB COM objects with ADO.NET's SqlClient.Command and DataReader objects delivers a significant performance boost to XML Web services.
Article. May 2, 2002.


10:58:43 PM    

We (the people I work with) have managed to solve the huge .NET Interop flaws that I have detailed in 2 seperate outings here. As I detailed, COM Interop in .NET is fundamentally flawed as the PIAs (RCWs) do not determinisically clean up all the COM Interface pointers and this is a showstopper problem in non-trivial COM applocations. So our .NET code has become peppered with Marshal.ReleaseComObject calls and even UCOMxxx calls. I have detailed why this is wrong before.

We have come up with a solution. In a nutshell, we implement intelligent wrappers that implement IDisposable and the Dispose Pattern, and have the wrapper call ReleaseComObject and such. This is something Microsoft should have done automatically in generated Interops and frankly we can't understand why. The nature of their response has been something along the lines of having to use Late Binding to not break COM Versioning? Excuse me? There is no COM Versioning and if Microsoft is inventing it now, it breaks the rules of COM. When I need a new "version" of a COM interface, I make a ILoveCOM2 interface. That's the extent of COM versioning. Period. We think COM Interop is broken without this.




10:29:16 PM    

Yasser Shohoud has a good overview of WS-Security. I've also been enjoying reading his Building XML Web Services with VB.NET book, which is available online in draft form. [Peter Drayton's Radio Weblog]

Great link! The book is fantastic for us guys not soaking in the stuff-))




10:12:47 PM    

Sam Gentile replies to my previous posting:

Umm, there is nothing managed about this "Managed C++" program and thus you will not get any of the CLR benefits. I think you may be confused about Managed C++ and this is common. As I say in my book, in Chapter 7, compiling with /clr will not make *any* of your data managed. It just changes compilation to emit IL in an assembly. All of the data is *still unmanaged* and coming from the unmanaged heap. That's why you have the problems above. Only the types you specifically mark with __gc or __value will become managed and the problems will go away.

My understanding is that managed code and managed types are orthogonal to each other. Managed code (produced when using the /clr option) consists of IL and metadata - which is what I see when I compile this sample program and look at its assembly using ILDASM, I don't see any native x86 unmanaged code. ...

and wonder what it is I'm missing.
[Cook Computing]

All of it-)) You are incorrect. Just because it's in an assembly doesn't mean you have all managed code. Don't take my word for it? Lets see what Siva Challa and Artur Laksburg, two of the guys on the MC++ team, who wrote the bloody thing, at Microsoft Essential Guide To Managed Extensions... say: "Your classes do NOT automatically become managed when you compile your code with the /clr option. There are several reasons why this is the case. First, because the C++ object model is quite different than that of the CLR, not every unmanaged class can become managed. For example, templates and multiple inheritance cannot be expressed on the CLR. Second, some managed classes can only be created on the GC heap (these are called gc classes) while others can be created on the stack and, with some restrictions, on the C++ or global heap (these classes are called value types). If your managed class is being created both on the stack and on the heap, you cannot make it a gc class or a value type without limiting its functionality. Assuming your class meets all the requirements, you can make it managed by adding the __gc or __value keyword in front of the definition." Just what I said. I hope this is clear and you will correct the incorrect assertions you have on your site.

 




10:10:20 PM    

Dave:Outage update, 11AM: I was able to string some baling wire, with the help of lots of scotch tape, and now have a very temporary workaround to the outage. Details

Thanks Dave! Back up! And BTW, Happy Birthday!!!




9:50:27 PM    


© Copyright 2002 Sam Gentile.



Click here to visit the Radio UserLand website.

 


May 2002
Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
Apr   Jun