Blog Home  Home Feed your aggregator (RSS 2.0)  
Implements IVillage - Monday, November 20, 2006
It takes a village to keep up with .Net
 
 Monday, November 20, 2006

We recently had some Microsoft PFE's (Premier Field Engineers) in to Harris Corporate to give us the crash cource in Team Foundation Server.  Apparantly Microsoft has a whole department (Premier Field Engineering) dedicated to customer's like Harris who back up a truck full on money to Redmond each year for licensing.  And what a department it is.  We traded in some of our support hours for the class as it has been a pretty good year for things not going too wrong.  The class was taught by Hamid Safi who was being shadowed by Cory Foy from the Tampa office.  Both guys were incredibly knowledgeable about TFS and almost any other Microsoft product we aksed about.  The class size was quite small and we got the opportunity to go off on some tangents when the in depth TFS discussion was beating our attention spans into submission.

Cory gave the presentation on the Testing portion of TFS / Visual Studio Team Edition where he used a great little Bowling Score class to demonstrate testing.  The discussion then worked its way down to the Agile / TDD.  His initial class was rudimentry and simply added scores.  Test cases were written for several of the simpler scenarios like frames of all zeroes and frames that did not include strikes or spares.  Youc an actually read about this in Cory's Blog entry here: http://www.cornetdesign.com/2006/11/bowling-revisted.html#links.  The demonstration and interactive portion of the talk began when we started covering the spare and strike cases.  Cory went into covering the spare scenarios and we quickly came up with a solution.  But while designing the solution, it became clear to me that the way we were implementing it was not very 'friendly' for implementing the upcoming strike cases.  And this is where the fun began... Cory preached the Agile / TDD gospel here: solve the problem you are workin on and then move on.  I was a bit resistant to his at first but also see its wisdom.  More time than I care to admit, I get bogged down in trying to design out the entire solution for eevery possible case before I get heavy into coding.  And I consequently do not start coding soon enough, do not have prototypes ready on time, and generally cut down on the time I have available to code.

Looking at the world with Agile / TDD glasses on is kind of nice.  I don't necessarily need to have the weight of the whole app or system on my shoulders at once.  I concentrate on getting done what needs to be done now and adding or refactoring in the next features that come down the pipe.  I shouldn't be afraid to write code that I will be throwing away in a few weeks.  The important thing is not the code but an understanding of the system that is being built and its rules.  Well written code will be adaptable to a degree, but when there is a signicant change to the system's requirements, we can't be afraid to throw that code away while retaining its tests and wisdom.

I am going to put an Agile / TDD book on the Christmas list.

Monday, November 20, 2006 9:01:57 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]    |   | 
 Tuesday, October 10, 2006

I recently had an issue where a contractor provided one of our divisions with a web service to deploy on of their servers.  When everything was deployed and the web.config all modified, we kept getting errors IIS 500 errors with:

Requested registry access is not allowed

After much finger pointing, and use of the phrase, "I can't suplicate the problem in my development environment".  I isolated the problem down to this one call in the contractor's web service:

evntLog.WriteEntry( sOut, System.Diagnostics.EventLogEntryType.Error);

The contractor had specified a custom event source for the EventLog control.  A Source being the value that appears in the source column of the event log.  Custom being that the source is not currently registered in the event log.

The evntLog object, which has its Source property set to CustomSrc, attempts to make a log entry.  The operation of this method is detailed in the Framework docs and is as follows: 

You must set the Source property on your EventLog component before writing entries to the log. You can call CreateEventSource on a new source to register it before writing to the event log, but this is not necessary. If the source specified in the Source property of this EventLog instance is not registered on the computer your component is writing to, WriteEntry calls CreateEventSource and registers the source.

So when the web service attempts to write the the log entry for the first time using its custom source, it calls CreateEventSource - which brings us to the KB article http://support.microsoft.com/default.aspx?scid=kb;en-us;842795:
This problem occurs because the user account that you used to log on does not have sufficient permissions.

The first time that you call the EventLog.CreateEventSource() method to create a custom event log, the custom event log entry is created under the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog

To create this subkey entry, you must have permission to write. However, the regular user account does not have permission to write. Therefore, you receive the error message that is mentioned in the "Symptoms" section.
The reason the developer did not see this problem on his development environment is that the event source was already registered while the web service was running with Administrator privileges.  So, when he later lowered the web service's account priveledge, subsequent calls to WriteEntry did not trigger a call to CreateEventSource.  So rather than keep banging my head against the wall on this, I wrote a simple application that an administrator can run on the server to register the event source:  RegEventSource.exe (28 KB)
So, in a nutshell... if you make use of System.Diagnostics.EventLog.WriteEntry with a custom Event Source, provide your client with an installer or some way to register the event source in their production enironment.  This is just another reason why I love VirtualPC.  It gives you an ideal environment to test these sort of deployments out to ensure you don't waste your client's time with trivial issues like this.
Tuesday, October 10, 2006 9:03:12 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]    | 
Come join the Space Coast .Net User Group to hear Russ Nemhauser speak about ASP.Net 2.0 Web Parts. Web Parts offer ASP.NET 2.0 applications the ability to provide powerful personalization functionality. In this session, you'll learn how Web Parts are implemented in ASP.NET 2.0, how to get up and running with Web Parts quickly, and how to extend the Web Parts framework. You will also learn how Web Parts functionality ties into the built-in membership features.
 
Tuesday, October 10, 2006 4:44:16 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]    | 
 Wednesday, September 13, 2006

Johnathan Goodyear of ASPSoft will be speaking. MasterPages are one of the most useful features of ASP.NET v2.0. They are also pretty easy to learn. However, there are a number of things that you can do with MasterPages that you may not be aware of. This session will explore some of these advanced techniques, tips and tricks to help you get the most out of your MasterPages experience. Ineta is sponsoring this meeting.

More Info: http://www.scdnug.org/events_view.aspx?eventid=14

Wednesday, September 13, 2006 9:45:25 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]    | 

Just spent a few days writing the build procedures for BizTalk 2006 development PCs.  I created a nice Windows 2K3 base with SQL, Office and Studio all ready for the using.  This was my starting point for the installation of BizTalk 2006.  One of the first steps was to rename the machines and re-SID them with NewSid so we could be good corporate citizens with uniquely ID'd machines.  When it came time to install SharePoint, I chose to do it on a non-default web site and to create unique accounts for the App and Admin app pools.  This would help mirror the eventual production configuration.  Everything seemed to go well and then when the step came to verify the extended SharePoint website - the fun began.

The main issue was that I kep getting 404's when trying to accesss the templatepick.aspx page for the new server.  I kep getting 404's.  I allowed directory browsing and could browse around to my heart's content - all the way up to that file.  Then - 404!!!!  I reviewed the logs and also noted:

"Unable to get the private bytes memory limit for the W3WP process. The ASP.NET cache will be unable to limit its memory use, which may lead to a process restart. Error: 0x80070005".

Very troublesome.  I then reran the install procedure without NewSID and it worked flawlessly.

So.  My solution was to not NewSid.  I did however come accross an article that listed some extenisve steps to make the whole thing work after NewSid does its thing:

http://blogs.interknowlogy.com/billsheldon/archive/2006/05/22/2705.aspx

Wednesday, September 13, 2006 9:34:46 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]    | 
 Thursday, August 17, 2006

Joe Healy presented a great overview on Microsoft's Atlas framework.  The turn out was excellent with atleast a dozen in attendance.  Afterwards we adjourned back to the the lounge bar at the Imperial Inn for an improptu Pub Club.  Looking forward to jonathan Goodyear at the next meeting!

Thursday, August 17, 2006 8:38:31 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]    | 
Copyright © 2008 Christian M Loris. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.