Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

Ryan Cromwell

@Ryan Cromwell
About
Posts
67
Topics
24
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • TraceListener.Close not called when added through config file...
    R Ryan Cromwell

    OK - So I figured out a solution, but I have to determine the impact. The worker thread IsBackground property had been set to false, mainly to increase performance. (This is supposed to be part of a high-performance, low impact auditing framework we are writing) I'm going to make the assumption that the Trace framework, waits for all non-background threads to complete before calling close. Thanks for the help...

    C# hosting debugging question

  • TraceListener.Close not called when added through config file...
    R Ryan Cromwell

    yup - can't override the TraceListener.Dispose method. You have to override the Dispose( bool ) method which i've done and had no luck with. Stupid Dispose!

    C# hosting debugging question

  • TraceListener.Close not called when added through config file...
    R Ryan Cromwell

    True, i haven't implementing the raw Dispose() yet. I'll give it a try, but i'm not holding out hope. :) Dispose( bool ) is the de-facto method for classes that have finalizers and is implemented by a number of classes, including the TraceListener base class.

    C# hosting debugging question

  • TraceListener.Close not called when added through config file...
    R Ryan Cromwell

    Hmm - turns out a i forgot a vital piece of infornmation. The hosting application hangs when this problem occurs. I implement the Dispose( bool ) method for just this issue, but it never gets to a point where that would be feasible. It appears, at first glance, that the framework is looking for all the threads owned by the hosting app to finish as its trigger for releasing the dynamic config listeners. It becomes a catch-22, it won't call Close until all threads complete, but I can't know to complete my thread without Close being called. :P Ugh - I really don't want to require explicit addition and closure of this tracelistener, even though it would be understandable concidering the purpose and goal of this specific listener implementation.

    C# hosting debugging question

  • TraceListener.Close not called when added through config file...
    R Ryan Cromwell

    I have written a trace listener that has at least one worker thread to process an internal buffer. When the Close method is called explicitly from within the hosting application, everthing is fine and dandy, but if i add the TraceListener from the system.diagnostics section of the config file, the Close method doesn't ever get called. Does anyone have any idea when that method gets called when added through the config file?

    C# hosting debugging question

  • Sleep Poll
    R Ryan Cromwell

    Tell me about it. I hit my bed around 11 every night and wake up between 6:30 and 7:00, but I'm always tired by 2pm. I think i need to stop being such a productive employee

    The Lounge

  • Async model question
    R Ryan Cromwell

    The problem arises when the client wants to stop listening. They've decided they no longer want to be a part of the chat session or the video stream or in my case the Trace/Debug broadcast. There very well may be more data "in a while", but the client/subscriber has chosen not to receive that data. I've implemented the Listener loop such that it handles ThreadAbort and does the socket.Shutdown and socket.Close in the finally of try...catch, but it doesn't seem right. I feel as if there should be an interrupt in there somewhere in the ReceiveFrom call on the socket. That's about the only other way to do it, but that's not built into the socket class, so oh well. Anyways, here's what we've got instead...

    C# question help

  • Async model question
    R Ryan Cromwell

    What is the suggested thread model for a Listener class? My particular situation involves an asyncronous multicast client that continuously listens for available data and notifies via delegates of received data. The problem is the receive function becomes a blocker if the sender no longer publishes data and the ListenHelper function will never progress. I realize that I could Abort the thread, but for some reason that seems like poor solution. Maybe not. See the snippet below: class AsyncMCListener { BeginListen { _thListener = new Thread( new ThreadStart( ListenHelper ) ); _thListener.IsBackground = true; _thListener.Priority = ThreadPriority.BelowNormal; _thListener.Start(); } ListenHelper { while( !_bDone ) { ReceiveData //BLOCKING CALL NotifyConsumerDataReady } } EndListen { _bDone = true; } }

    C# question help

  • setting UserControl properties that are Controls themselves
    R Ryan Cromwell

    How can you, if at all, set properties of a UserControl which happen to be controls themselves (ie System.Web.UI.WebControls.Image) in the designer instead of in the code-behind. Also, how can you use elements instead of attributes to set the properties of a UserControl. Example: This is the Blahest control ever

    ASP.NET design tutorial

  • Job hunting...
    R Ryan Cromwell

    So I've decided I'm no longer am excited about my job. I know I shouldn't care in the context of the job market, but I'm selfish and arrogant. Where is everyone looking/posting jobs at right now. I work for a larger company through consulting firm, but I would like to look on my own as well.

    Work Issues career

  • TabControl still not good
    R Ryan Cromwell

    While MS seems to walk both sides of the fence sometimes, they aren't their to do the development for everyone. That's why they built VS in the first place - so people could develop stuff. Most of the controls MS provides are pretty low in functionality anyways - the TabControl is pretty nice for a freebie. And as you said - it's not a tough fix - so go do some development.

    C# csharp help question announcement

  • Internet hosted EXE doesn't like app config file
    R Ryan Cromwell

    I have a WinForm app that is fine and dandy when executed as a simply local exe. I'd like to host it via a webserver (http://blahwebserver/MyApp/Myapp.exe). I've gotten through a few initial issues which brought to light some holes in exception handling, but I'm really running into a problem with the config file apparently not being loaded. I don't really know what to do about this or where to research on it, though I kinda hoped it would have been mentioned in here[^] but it wasn't. So I've got nothing at this point.

    C# html com help question

  • Singleton/static member question...
    R Ryan Cromwell

    Can someone explain to me the lifetime of a static member variable? That is, in a singleton, one has a static member variable of the single instance and a static member function which returns a reference to that instance. How is it that, 1) the static member variable is maintained, 2) the static member variable is destroyed (GC in the CLR, but what about unmanaged languages)?

    C# question dotnet

  • I have a problem with streaming XML.
    R Ryan Cromwell

    c:\YourProjectPathHere\GenerateXmlTreeView.aspx is what you are getting from Server.MapPath("GenerateXmlTreeView.aspx") You want: http://

    ASP.NET help sysadmin data-structures debugging xml

  • Web Setup Project w/ Multiple VirDir's
    R Ryan Cromwell

    We have a number of Support tools that need to be deployed as 2nd Level VirDir's. I have accomplished most of the deployment withing a single setup project with multiple Web Custom Folders for each tool. Problem is as you add each Web project (each tool has it's own) primary output, files, etc, it assumes the dependencies are in place because the previous project had the same ones. Problem is they aren't at the same level and each app/VirDir doesn't have its dependencies. Has anyone figured anything out without adding each dependency or a single project for multiple tools?

    ASP.NET sysadmin tools help question workspace

  • Oh My GOD, Mass distraction weapon on Baghdad
    R Ryan Cromwell

    A lot of that was caused by old Patriot guidance systems. The new PAC3's use GPS rather than error prone and intense terrain maps.

    The Lounge com

  • beginner question in C#
    R Ryan Cromwell

    output is not a 2 dimensional array. its a 1-dimen. array which happens to be maintaining another 1-dim array. /***********************************************************/ int[,] output = new int[10]; for(int i=0; i<10; i++) output[i] = func(); --- func returns int[100] /***********************************************************/

    C# help csharp data-structures tutorial question

  • Here's one for ya
    R Ryan Cromwell

    Holy crapper! If you put a space between the opening OtherSettings element and the opening EmailSettings element, it works fine. Can anyone think of a real good reason that is a bug? Modified: Sorry make that just before the opening OtherSettings element.

    C# data-structures xml question

  • Here's one for ya
    R Ryan Cromwell

    Try the following out. Why is the emailsettings element tree read BEFORE the othersettings element (its parent)! Am I blind? while( settings.Read() ) { string section = settings.Name; switch( section.ToLower() ) { case "pollagentsettings": break; case "profileragentsettings": break; case "othersettings": break; } } /* Use this as your settings.xml document - it is the output from the XmlTextWriter */

    C# data-structures xml question

  • problem with saving XML to xml file
    R Ryan Cromwell

    Cause it's static.

    C# question xml help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups