Jason Clark's Blog

Software, Hardware, whatever...

  • WCF Streaming Issue Under IIS

    Recently, I've been doing a lot of work with streaming under an IIS hosted WCF service (using the BasicHttpBinding).   I ran into a rather strange issue, that appears to be an oversight deep inside the internals of WCF.   Enabling streaming on a binding is typically set when you anticipate sending large objects across the wire, and do not want to buffer up the entire message prior to sending.  When streaming mode is enabled, the headers of the message are buffered and the body is exposed as a stream and sent across the wire.   When you host your service inside a console app or windows service, everything works as expected (the body is indeed streamed no buffering at all).    Now comes the issue...

  • A lesson learned about concurrent calls and WCF binding config.

    I learned yet another binding configuration attribute today, that plays a rather important role if you have a service that could accept a large amount of concurrent calls.  By concurrent, I mean dozens of calls that come in at the same time.   Of course the standard throttles in this scenario are important, maxConnections on the binding and the various service model throttles (maxConcurrentCalls,maxConcurrentSessions,maxConcurrentInstances).  There is however one attribute that you may not be aware of, that if not set correctly will cause your clients to throw a rather nondescript exception like:

    "The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.4383964'."

    After spending the better part of a day, changing settings and staring at trace logs, I posted in the MSDN forums an example application demonstrating this behavior.  In the end, the solution to the exception was setting the listenBacklog attribute on the binding.  What does it do?  (from MSDN) "ListenBacklog is a socket-level property that describes the number of "pending accept" requests to be queued. Ensure that the underlying socket queue is not exceeded by the maximum number of concurrent connections."  So, ensure that you have this set higher or equal to the amount of maxConcurrentCalls.

    Hope that helps someone else staring at a trace log, that doesn't indicate there are any problems with the service config.   Hopefully at some point a more descriptive exception is thrown when you hit this binding throttle.
     

  • Wierd windows forms ListView Issue, bug in .NET?

    While working on a decent sized Windows Forms app in c#, I've seen a sporadic issue crop up that is incredibly difficult to debug.   The form simply has a listview on it that is populated from a worker thread.   The calls are all done with Invoke, on the UI thread.   But, every once and awhile (it's sporadic). .NET throws this:

  • File or assembly name not found follow up.

    So, we finally figured out a problem a customer had with Microsoft's help.  As posted below the customer had random errors where a temp file that was generated by .NET (confirmed by Microsoft).   We ended up using filemon to log disk access while the error occurred, and the culprit was FreeTextBox.   We don't use FreeTextBox (although it is a great editor), but somehow it was in the bin directory on the clients server.   After we removed that dll the problem went away.   If we had been using it, the solution would have probably been to add it to the GAC.  If you ever run into this, use the method above as it's more than likely permissions and you'll know pretty quick whats going on with filemon from sysinternals.

  • File or assembly name or one of its dependencies not found?

    We've recently had a customer contact us about an obscure error having to do with a dependency/assembly not found.   It looks like it's a temp file produced by .NET during compilation and is for some reason not found afterwards or during.   I've dug around and found that there are a couple of solutions to this issue, neither of which worked for the client. One was to disable indexing services so that no read locks would be performed on the temp dir that the .net framework uses, and the other was to register the DLL's into the GAC.   Problem is that the DLL or assembly its talking about doesn't exist in the applicaiton it's a temp file.  Error is below, if anyone has any ideas I'm all ears.

  • Scoble throws it right back at Joel.

    Joel over at Joel on software threw out some interesting commentary about how life at FogBugz palace is, compared to the dismal rags over at Microsoft *laugh*.   Scoble responded today with a colorful synopsis of just how bad life is at Microsoft.  I don't know about Joel's developers, but I sit in front of a 22" Apple Cinema display and use a Dual 3.6 Xeon with 2GB of memory ,15K SCSI  and a Quadro 3400 FX at home.

  • FireFox can also have bugs? Could it be that FireFox developers make mistakes too?

    Ever since FireFox started to gain momentum you constantly hear "FireFox is much more secure than IE".  These opinions are usually shared by folks that have not grasped the concept of  software development and popularity.   Anything written by any human is apt to have bugs.  Do you really think that FireFox engineers are brighter than any other engineer out there?  Do you think that with the cash Microsoft has on hand that they can't afford quality engineers?  The fact is that bugs are a fact of life, humans make mistakes and a FireFox engineer is no different than any one else.  In fact, according to an article in Internet Week, there are a pair of critical issues in FireFox that required you to shut off Javascript to be safe, pretty nasty stuff.  Just goes to show you that with popularity, awareness is increased and bugs are found.

  • CSS Architecture - Standards?

    I've been doing some research on CSS Architecture/Standards, and have come up rather dry.   After spending a few hours hammering google with various keywords etc I can't find a single entity publishing any guidelines/standards for CSS development.  What I mean by that is CSS architecture as it pertains to the UI development, not the standards of the specification.  For example, is it best to use ID declarations for objects, or classes, etc.   Has anyone seen anything or read anything that talks about UI architecture using CSS? 

  • Just finished up an article on AMD Dual Core Opteron.

    It's been a ton of last minute benchmarking, but well worth it.  Dual Core is set to make huge tracks in the server market, with impressive scaling.   Uniprocessor server configurations might well rise and Dual processor database servers will essentially perform like a 4P system.  Intel is still setting their Dual Core launch for Q1 2006.  We had a chance in the review to benchmark Intels latest Quad Xeon servers based on their new E8500 chipset, the system we had required 208V, a bit unusual from our experience but apparently doable at most NOC's.  So, we had to wire a 240V circuit in the lab.   The article covers both desktop and server performance, workstation is on the way.  The server stuff is near the beginning and covers web & sql performance.

  • ASP.NET 2.0 Membership/Role Observations

    After digging a bit deeper this week on the built-in Membership/Roles functionality, although it is quite extensive there seems to be a weakness in using it for a more robust security model.  Maybe I've missed something, but here goes: