Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008


all groups > dotnet clr > february 2004

Filter by week: 1 2 3 4

[BUG] Queue.Clone defective
Posted by Christoph Nahr at 2/29/2004 4:22:48 PM
The little program that follows this post demonstrates a defect of the Clone method of the System.Collections.Queue class. The program twice prints two columns of strings: the elements of a queue and its clone. The first output shows the clone of a queue whose elements were enqueued but never ...more >>

GC question
Posted by Mark at 2/27/2004 6:56:07 AM
Hi I have a scheduling application that runs several assemblies every 5 - 20 minutes. Assemblies to run are loaded from file dim a as [Assembly a = [Assembly].LoadFrom("assembly_file") then types that implement custom interface are found and executed in a new thread. When thread is finished I...more >>

How does an .NET know which version of framework to use
Posted by srini at 2/27/2004 1:06:06 AM
Hi How does a .NET application know what version of the framework to use by default. For example I have framework version 1.0 and 1.1 on my machine. When I develope an App using VS.NET 2002 it uses framework 1.0. How does the app know it Is this info stored in the assembly REgards Srini...more >>

Dispose must be thread-safe ?
Posted by Lasse Vågsæther Karlsen at 2/26/2004 4:30:16 AM
Continuing on my first post, I read this article today (mind the line breaks): http://www.theserverside.net/articles/article.aspx?l=GarbageCollection and in this article the author says that the Dispose method must be thread-safe. I'm going to assume that this is correct, and as such just...more >>

GC question #1 - multiprocessor/timing
Posted by Lasse Vågsæther Karlsen at 2/26/2004 4:20:18 AM
I read the following article this morning (mind the linebreaks): http://www.theserverside.net/articles/article.aspx?l=GarbageCollection This article concludes that you need a GC.KeepAlive inside a using clause in order to make sure the object you're using will stay alive until the using clau...more >>

assembly reference lost.
Posted by Marco Liedekerken at 2/24/2004 10:17:54 AM
Hi, Everyday when I try to build my solution I get the message that I am missing the assembly reference to the DSO dll. Then I have to execute the MS SQL Server 2000 Analysis Services SP3 again to retain the assembly reference for the DSO. Then I can work all day installing and uninstalling m...more >>

Understanding threading model
Posted by Mark J. at 2/23/2004 11:21:05 PM
Hi, I've been doing some experiments to better understand threading within an app domain, and I have a couple of questions perhaps you guys could help me with... The MSDN docs point out that as long as there are foreground threads an application will not terminate. Although I can't find any me...more >>

Weird behaviour : GC & Multithreading ...
Posted by Lorenz Schallinger at 2/23/2004 11:14:59 AM
Look at the following code : I instanciate a class which creates a new Thread in its .ctor. Then i set the instance of this class to null and let the GC run - but GC only cleans this instance up if I explicitly Start() and Abort() the thread .... I find that this is not the way one would ...more >>



IEExec command line arguments
Posted by Corey at 2/22/2004 11:01:07 PM
Hi all I'm currently learning about Zero-touch deployment with WinForm apps, and I am trying to set up an app in Visual Studio .NET 2003 so that it will run with IEExec.exe to simulate the setup of an appropriate security environment for the application to run in The parameters for IEExec.exe ar...more >>

Multiple put_ property accesors
Posted by Michael Sparks at 2/21/2004 9:19:51 AM
I am trying to accomplish something like this: (C# pseudocode) class MySample { IBigObject _value; Type _type; public IBigObject TheBigObject { get { if(_type!=null) { _value=(IBigObject)_type.GetConstructor(Type.EmptyTypes).Invoke(new object[0]); _type=null; ...more >>

Some question about CLR and managed applications
Posted by Sheila Jones at 2/20/2004 11:21:47 AM
Hello, I'm trying to get my brain around the CLR! Can somebody tell me if the following are correct? Thanks. 1. The CLR runs each managed application in its own application domain, but there can be several application domains within the same process. 2. The managed heap is shared by all a...more >>

Finding out the current class in a static method?
Posted by Rick Strahl [MVP] at 2/18/2004 10:54:35 PM
Is it possible to get a Type reference to the currently executing type from a Static method? public class foo { public string static FooM() { Type x = ???? return "Crap"; } } public class foo2 { public string Something() { return "x"; } } then if callin...more >>

Growing Working Set Size on GUI App
Posted by Niall at 2/18/2004 12:00:17 PM
I know there have been a lot of posts in relation to GC, working set, trimming working sets, minimizing forms, etc. I've read every one I can find, but have not found a solution to my problem. The closest I ever found was the thread here recently "GC does not release memory... memory keeps growi...more >>

NullReferenceException Message Feature Request
Posted by Bryan Livingston at 2/18/2004 11:21:07 AM
I'm guessing that NullReferenceExceptions are by far the most common exceptions thrown in .net. Why not add the type of the reference to the message? Have it say something like: Object reference of type 'string' not set to an instance of an object. This would really help when trying to figur...more >>

Profiler
Posted by Frank Rizzo at 2/18/2004 10:12:33 AM
Can anyone recommend a good profiler for .NET? It should support both vb.net and c#. Thanks...more >>

asynchronous delegate problem
Posted by Sankar Nemani at 2/17/2004 2:53:57 PM
I have a delegate which I call BeginInvoke on. I use the waithandle.WaitOne to wait for the delegate to finish. If there is an exception in the delegate call, waithandle.WaitOne returns true and the asyncresult.IsFinished(Completed) also returns true. How do I know if there is an exception and t...more >>

Strange problem with C# and platform invoke
Posted by sqcliu at 2/17/2004 1:46:13 AM
I encounter a strange problem using platform invoke using C#. The senario is this: I have a dll which uses a 3rd party static link library (lib). Inside the lib, there are some C structures defined by not exposed to user, in the dll, that data type can be treated as an opaque type. I use C# a...more >>

Obtain .NET "Ticks" from J2EE "Millis"
Posted by num NO[at]SPAM laposte.net at 2/17/2004 1:39:35 AM
Hi all, Sorry for cross-posting. I have to convert a J2EE date as a long ("Millis") in a .NET date as a long ("Ticks") In Java, currentTimeMillis, is the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. In .NET, DateTime.Ticks is the 10...more >>

CLR extentions
Posted by Ole Andre Karlson at 2/16/2004 6:11:04 AM
Hi, it is my understanding that to support generics the CLR (at least the IL) had to be extended with new instructions. I have been wandering around the ms site looking for ducumentation without succses, can anyone point me in the right direction? thanks Ole...more >>

Button click single
Posted by Pat at 2/16/2004 12:01:06 AM
Hi I have been creating an Button using .Net C#. Once the user clicks the button, the click event handler will perform task A. This normally takes around 2 minutes During this 2 minutes, the user must not be allowed to click this button again However, once the user clicks multiple times on thi...more >>

get type of array items?
Posted by boxboy at 2/14/2004 9:41:06 PM
I am trying to write a utility method/function in c# to resize an array, the problem I have encountered is how to safely get the Type of the items in the array, even when the array is empty. Here is how the code I wrote: public static Array Redim(Array a, int length) { Type type = a.Ge...more >>

pdb access through ISymWrapper
Posted by matt NO[at]SPAM use.net at 2/13/2004 8:20:35 PM
Let me give a quick user story here: I need to be able to go from a byte offset in a method body to a line of source code reference. I need to do this statically, without the application being run in the debugger or otherwise. I would really like to do this with purely managed code. That bein...more >>

ANN: .NET Memory Profiler 2.0 Released
Posted by Andreas Suurkuusk at 2/13/2004 1:51:01 PM
SciTech Software is pleased to announce that .NET Memory Profiler 2.0 has just been released. ..NET Memory Profiler is a powerful tool for finding memory leaks and optimizing the memory usage of .NET Programs. For more information see the .NET Memory Profiler web site at: http://www.scite...more >>

Re: What does the CLR do when you instantiate an object? - Continue
Posted by stack at 2/13/2004 10:26:05 AM
Hi Avon Last night I was able to duplicate your experiment with your sample classes with debug point at the parent class constructor On the stack dump, I did see the test class's main methos at the bottom of the stack, abov the Main mathod, it was childclass's constructor and then directly abov...more >>

MFC App compiled with /clr
Posted by Kaixin at 2/12/2004 6:23:49 PM
Hello, We successfully compiled (on .NET 2003) and ran a MFC application using COM, and then we try to compile it with /clr switch on .NET 2003. The compilation is successful, but the MFC app failed to start with an error thrown "Cannot change thread mode after it is set..", when calling HRESULT...more >>

.NET Assembler Structure
Posted by leohyppolito NO[at]SPAM uol.com.br at 2/12/2004 4:17:34 PM
Hello friends, I am finishing my Computer Science graduation this year, and I have to make a final project for it. As I'm working with Microsoft .NET, my idea is to write my project about the MSIL. A software that will disassemble the .EXE (generated by VS.NET 2k3 without obfuscation), and ...more >>

mscorwks.dll could not be loaded (although I have installed Framework 1.1)
Posted by Robert at 2/12/2004 5:36:07 AM
With certain combinations of my app's dll's, my app fails at startup with the message ...\V1.1.4322\mscorwks.dll could not be loaded I do in fact have the .NET Framework 1.1 installed on my machine, and I can run other applications with it I have a feeling it has to do with my trying to lau...more >>

Adding Printer and Printer Ports (report from framework group)
Posted by David Williams at 2/11/2004 8:34:02 PM
I have been attempting to find a way to [programmically] add printers to a server. This requires that a new port be added. I have not been able to find a means to accomplish this. I did find some *old* posts for using the AddPortEx/AddPrinter APIs from the winspool.drv, however, while I can ...more >>

Runtime and OS report different mem usage
Posted by geng shang at 2/11/2004 11:51:05 AM
Hi I am working on a pure managed windows application that creates large byte arrays at run time. In fact it creates a 50M byte array when the application starts public static byte[] buffer = new byte[1024*1024*50] I am using System.GC.GetTotalMemory() to monitor the memory usage. It is consist...more >>

A DotNet Severe Limitation ?
Posted by Dave Brown at 2/11/2004 11:41:13 AM
I believe I have found a severe limitation of DotNet, with respect to hosting Windows Form Controls in WebPages. It appears this is only possible when the web is configured on Port 80. Any other port and the control will not display. After a couple of days of searching the newsgroups/various for...more >>

DefineMethod causes TypeLoadException
Posted by Brian Tyler at 2/9/2004 12:35:00 PM
I am using the COM Profiling API to hook into the CLR and dynamically modify the program. I have been successful with the modification of existing methods, but now I want to add my own. To do this, inside the ModuleLoadFinished() method, I add the following call to DefineMethod: ...more >>

Serializing/DeSerializing System.Drawing.Cusrsor object looses the hotspot
Posted by Sankar Nemani at 2/9/2004 11:39:25 AM
Hi All, We are trying to Serialize a System.Drawing.Cursor object and Deserialize it. Before serializing the cursor behaves correctly but when we serialize and use a deserialized object, the hotspot (the cursor pointer) is not where it is expected to be. We tried both binary and soap formatt...more >>

CLR Profiler Setup Help
Posted by Tyson Brown at 2/8/2004 5:26:11 PM
I am hoping this is a quick solution. I am trying to get the CLR Profiler working on my machine and it doesn't seem to be hooking into aspnet_wp.ex Here is what I do 1) Start the profiler on the web server, I choose "Profile ASP.NET 2) It stops IIS, Restarts IIS and gives me the "Waiting for AS...more >>

Flaws in CTS rules?
Posted by pn at 2/8/2004 4:01:05 AM
Hi everyone I was interested under which conditions the CTS grants access to program entities. So I took a closer look at the CLI Standard (mostly Partition I, section 8.5.3). What I found there didn't make sense to me. For instance, consider the following MSIL program public class Outer i...more >>

Calling BinaryFormatter:Deserialize(Stream); Asynchronously
Posted by Assaf at 2/7/2004 5:28:43 PM
hi all SORRY FOR CROSSPOSTING: i did not know which group deals with this question! Question: i am looking to call the following function, ASYNCHRONOUSLY: Packet p = (Packet)this._BinaryFormatter.Deserialize(this._Stream); Can it be done? assaf ...more >>

Transitive references
Posted by Jon Shemitz at 2/6/2004 1:48:55 PM
If I create a BaseClass in a BaseAssembly, then derive a MiddleClass in a MiddleAssembly from the BaseClass, a TopAssembly that derives a TopClass from MiddleClass (or just creates a MiddleClass instance) needs to reference both MiddleAssembly and BaseAssembly at compile time, even if it does no...more >>

Where does managed heap belong?
Posted by Kamil Dworkowski at 2/5/2004 5:51:21 PM
Hi, Does managed heap belong to specified app domain? If it does then is the collection done independently for all app domains? Kamil ...more >>

System.ExecutionEngineException
Posted by ShijuFrancis at 2/5/2004 11:46:06 AM
I'm getting the System.ExecutionEngineException from my data layer when I'm trying to Insert a duplicate row into the database using the ExecuteNonQuery method of command object. I'm using OLEDB connection in my application.I saw in the microsoft site saying that its an internal CLR error.So i tried...more >>

Creating publisher policies for DLLs
Posted by MT at 2/5/2004 8:48:02 AM
We have a .NET dll that we are deploying to our customers using a deployment project in VS .NET 2003. There is a lot of information about creating publisher policies on the web, but we have not been successful in creating one. Here's what the ultimate goal is: When the DLL is deployed to a custo...more >>

converting Unix datetime count to .Net DateTime object
Posted by Mark Worrall at 2/4/2004 5:34:49 PM
I am being supplied a count of number of seconds since Jan 1st 1970, i.e. a Unix system time. How can I convert this into a valid .Net DateTime object ? thanks, Mark WinXP / C#.Net 2003 ...more >>

embedded winforms in IE wont cache
Posted by bryan at 2/4/2004 9:16:08 AM
I have a problem. The issue is that my embedded winforms in IE will not cache no matter how hard i try. They seem to goto the download assembly cache but they dont load from there like the framework documentation has stated. I have tried versioning, strong naming, and everything else i can think of....more >>

Performance, Scaling and GC
Posted by Tyson Brown at 2/3/2004 9:36:05 PM
All I am in the process of load testing an application and I am not happy with the scalabity of the preliminary system. Under a moderate load of 300-400 users per test machine (Dual P4-700,3 Gig of ram), I am noticing some very slow page loads. To simulate the load, I have been using ACT (althou...more >>

Does Dispose method forces garbage collection.
Posted by Kamil Dworkowski at 2/3/2004 8:02:19 PM
I found that statement in some book but it does not comply with Framework SDK Documentation. Kamil Dworakowski ...more >>

Getting indexed property values
Posted by John Sands at 2/2/2004 5:44:58 PM
I'm writing a utility to dump out the contents of any object. I'm having trouble getting indexed property values because I can't find a way to get the indexes themselves. PropertyInfo.GetValue takes an object and a collection of indexes, but I don't know what the index values are for the object ...more >>

Build Warning
Posted by JT at 2/2/2004 7:11:07 AM
I am getting a warning on a custom control that is first in the build order, and is used throughout my main project, which is called Practice Management This started appearing recently, and I am not sure why. More importantly, what do I have to do to fix it? Thanks J OUTPUT FILE FOLLOWS ---...more >>


DevelopmentNow Blog