So Microsoft comes to the Orange County Convention Center for two weeks in June (aka TechEd). They paid for the thing for two whole weeks. The weekend between the IT Pro Week and the Dev Week is part of that two weeks and the aforementioned facility will be sitting idle. What so you do? Let the community have it...
Microsoft Commmunity Summit 2008
Orlando Convention Center, June 7 and 8
So what is it? Basically, the Florida User Group Communities were asked what would they do with the Orlando Convention Center for a weekend? What they came up with was a FREE weekend with loads of great content. Get all the latest information and registration at http://www.floridatweener.com.
I hope to be there. I am attending Tech Ed on the first week. It looks like it is going to be an amazing event. Joe Heally put the call out to the community and this is what happened. Take a look at the agenda and you'll be amazed. Hope to see you there.
If you came to the Visual Studio 2008 Install fest, then come to the Intro class. Joe will be giving the guided tour. If you already know the product, wait until the end of the presentation and hit Joe with the hard questions... he can take it.
Introduction to Visual Studio 2008
Presenter: Joe Healy, Microsoft Developer Evanglist
Microsoft® Visual Studio® 2008 delivers on Microsoft’s vision of smart client applications by enabling developers to rapidly create connected applications that deliver the highest quality, rich user experiences. With Visual Studio 2008, organizations will find it easier than ever before to capture and analyze information to help them make effective business decisions. Visual Studio 2008 enables organizations of every size to rapidly create more secure, manageable, and reliable applications that take advantage of Windows Vista™ and the 2007 Office system.
Where: Charlie and Jakes Brewery Grill 6300 N Wickham Rd Melbourne, FL 32940 USA driving directions
When: 1/22/2008 6:30 PM - 8:30 PM Welcome Time: 1/22/2008 6:15 PM Eastern Time
I am in the middle of a medium size BI project where we chose Microsoft for ETL with the SSIS component of SQL Server 2005. For various factors, we decided on Cognos 8 for the Cube and Presentation layers. As part of the analysis we took in to account things like cost, Gartner, In-House skill sets and so on. It was a pretty even race for Cognos & MS Performance Point Server (PPS) and we ended up going with Cognos.
Some background information on our Cognos implementation. It came in-house with a product called Agile. So since we were licensed, we went with it for basic reporting needs. Now we're at the point we're we are really looking at BI - time analysis of data, ad hoc analysis, KPIs, and so on. We made an assumption that we could leverage our existing Cognos skill sets into the world of Cognos 8 BI. It wasn't a great bet. We sent some people to training and they took away what most take away from a week long course based on a vendor curriculum (This is not just a Cognos issue, we have a real challenge finding solid training for the Microsoft stuff too).
Now, I was in the same position our Cognos talent was in when I went to work on BizTalk. I had a strong background in the fundamentals of .Net languages and Web development. I went off to take the one week training course (much love to Mark Berry at Dunn Training) and came away with a strong set of basic tools. When I went up against the kind of problems we're hitting in Cognos right now, there was a difference.
Searching for help on Cognos technical issues is really difficult. There is very little out there in the way of web based community. And a lot of what you do find refers to Cognos' KB which is protected by password. I am not sure what the hurdle is to getting the password setup... a call to our account representative and some paperwork. When you're slugging out a technical issue this is not the best customer experience to have.
On the other hand, Microsoft's community is unbelievably rich and returns many hits when searching for answers. BizTalk is a pricy tool and is seldom afforded by those outside of serious enterprise grade businesses – which makes is developer base quite small compared to C#, SQL, ASP.Net, etc. Never the less, there is a rich and vibrant community of users who post and share tremendous amounts of technical insight and know how. I have become truly active in my local developer community in the pas couple of years and I see now why Microsoft pours so much effort into these folks. As a direct result, I typically can solve most of my technical glitches or unknowns with a minimal amount of time on Google or Live Search.
I am not saying Microsoft is perfect. I have my issues when I call in for Technical Support and deal with some of the first line folks. I here the same frustrations form my Cognos counterparts. The nice thing is that there is such a wealth of Microsoft product knowledge living both outside and inside Microsoft, that it’s one of those intangibles that is rarely given due weight in a product study. It certainly keeps the number of calls I’ve made to Microsoft to a minimum. As for which is the best product… another time and another blog post.
Comment: If anyone ever wants to experience the Microsoft community in full force – go to a local Code Camp. I’ve never gotten so many professional contacts in one place. And if there aren’t any near you, call you Microsoft Developer Evangelist and ask nicely for some help. You’d really be amazed.
http://scdnug.org/blogs/events/archive/2007/11/16/Visual-Studio-2008-Install-fest.aspx. Let me reitierate what free means here. First fo all it is free like beer (not free like a puppy). But... there is no glass for the beer. You must drink it right there and then from the tap. That is, you are not given install media or such at this event. You are only temporarily given a CD to install with and that is it. You are licensed for the instance of this installation only. Hope to see everyone there! Even if you don't need VS 2008, come by and have a beer and say Hello to everyone. Microsoft has been known to buy a beer or two... no promises.
The Space Coast .Net User Group is in the early stages of planning a load fest for Visual Studio 2008 with Joe Healy - MS Developer Evangelist. The tentative date is Dec. 18th and the first 20 attenddees can bring their laptops and load the product for free. We're looking for a location right now and since loading software (even free software) is so much fun (sarcasm) - it will hopefully serve alchohol. Stay Tuned here or to the Space Coast .Net User Group web site.
I will be be giving my first technical presentation at the Space Coast .Net User Group on this Wednesday night. If you are coming, don't forget to clicktoattend. Follow the link for directions too. I hope to see everyone there and you will be frisked for rotten vegetables at the door.
I was implementing some data access code for a personal project using the Enterprise Library's Data Access Application Block (DAAB). I was running some code that checked for the existence of a row prior to issuing an insert. Here is the original code:
SqlDatabase db = DatabaseFactory.CreateDatabase("mainDB") as SqlDatabase;
string sqlCommand = "ar_GetArrestReportItemByCaseNumber"; DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand);
db.AddInParameter(dbCommand, "reportId", DbType.Int32, reportID); db.AddInParameter(dbCommand, "caseNumber", DbType.String, caseNumber);
IDataReader dataReader = db.ExecuteReader(dbCommand);
exists = dataReader.Read();
After running through on some test data, I gave it a run against some real world data. And it worked fine until the data's batches exceeded 100 rows. Then I got the error message:
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
I checked SQL Manager and saw 100 connections / processes accessing the table in question. I am using the DAAB. The Database class is supposed to take care of this sort of thing for me. There was a bug in VS 2003, but this was fixed in VS 2005. Where is the connection being left open... the DataReader. I forgot to close the DataReader. I promptly re-educated myself on some ADO and IDisposable. Whenever an object implements IDisposable, there is probably a good reason for it... like say... releasing a connection object back to the connection pool. Corrected code and much better performance:
SqlDatabase db = DatabaseFactory.CreateDatabase("mainDB") as SqlDatabase;
string sqlCommand = "ar_GetArrestReportItemByCaseNumber"; using (DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand)) { db.AddInParameter(dbCommand, "reportId", DbType.Int32, reportID); db.AddInParameter(dbCommand, "caseNumber", DbType.String, caseNumber);
using (IDataReader dataReader = db.ExecuteReader(dbCommand)) { exists = dataReader.Read(); } }
Moral of the story... if IDisposable is implemented, chances are you should call it.
ADDENDUM ---------- For those who are not familiar, IDisposable is an interface for the implementation of the Dispose Pattern. This is very useful in programming languages that have Garbage Collection (ie. .Net). When you have Garbage Collection, you have what is called a non-deterministic destructor. In other words, when you are done using an object, you have no idea when it's resources will be freed. Garbage Collection occurs at an interval that is determined by the system. By implementing IDisposable, you ad a Dispose method to your class where high contention resources can be freed (ie. File Handles, Database Connections, etc.). The implementing of IDisposable signals the user that there is something valuable to be cleaned up ASAP that cannot wait for Garbage Collection. So, even if Dispose is called, the Garbage Collector will still clean up the object's resources eventually. But in the mean time, all of the high value resources have been released.
It was wort the early morning drive to Seminole Community College from Melbourne. The directions provided on the flyer made it slightly challenging to find but all went well. The key note from Carl Franklin was a humorous retrospective on his career and the progression of Microsoft Technologies from earlier days. However due to technical difficulties with his guitar, we were not treated to a live performance (nor was there a live performance from old man Paul later that evening either).

I attended several good talks. My favorites:
- Wes Dumey - Great primer on EDW and SSIS. Looking forward to spending some time with SSIS, this was a good start.
- Richard Campbell - SQL Tips presentation. I understand this is one of his regular presentations and I understand why. Lot's of practical advice and an intro to some of SQL 2005's new features. Very Technical and very humorous... this is one session that went by in a flash and left me wanting another hour.
- Miguel Castro - Great Great presentation on extensibility patterns. Lots of practical information with backing code samples. I have never seen Miguel in person and was not disappointed. Top notch speaker.
Overall, it was a great way to spend a Saturday. Got to catchup with some developer friends I have not seen in a while. I also got to make some new friends in the 'There's no more pizza, just wait for the next delivery' forced networking session with my starving co-attendees. Lot's of thanks to ONetUg for a job well done!
When workin with the Accordion control in my previous post, I encountered a bug that made life a bit frustrating. Everytime I broke into the debugger on the ItemDataBound event handler and expanded the event - Crash! Whenever the display got to e.Item, things stopeed and got funky. Stop debug and restart. Create a watch for e.AccordionItem... don't expand the evil e. I finally took some time and dove into the Accirdion's source code.
I kept looking at this over and over again and could not figure out what was going on and then it clicked - Stack Overflow! There is a recursive call in the AccordionItemEventArgs class:
/// <summary> /// Container /// </summary> private IDataItemContainer DataItem { get { return Item as IDataItemContainer; } }
/// <summary> /// DataItem being bound to the Container /// </summary> public object Item { get { return DataItem.DataItem; } }
When the debugger evaluates Item to display it for you, it calls the DataItem property which in turn calls the Item property and so on...
Going to submit this to the Ajax bug list. I am modifying my copies definition of the Item property as follows: /// <summary>
/// DataItem being bound to the Container
/// </summary>
public Object Item
{
get { return _item.DataItem; }
}
I was recently using the Ajax Accordion control on a project which required me to do some databinding with it. I was accessing more than one object to fill out the Accordion panels so I wanted to set alot of the controls during the ItemDataBound event of the control. I quickly became frustrated as I could not find the controls in the AjaxContentPanel being made available to me in the AccordionItemEventArgs. Here is what I was working with:
<form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> <cc1:Accordion ID="Accordion1" runat="server"> <Panes></Panes> <HeaderTemplate> <div style="background-color:blue;cursor:pointer;"> Header: <!--%# Eval("Key") %--> / <asp:Label ID="lblHeader" runat="server" Text="Label"></asp:Label> </div> </HeaderTemplate> <ContentTemplate> <div style="background-color:Silver;padding:5px;border:thin white inset;"> Data: <!--%# Eval("Value") %--> <asp:Label ID="lblData" runat="server" Text="Label"></asp:Label> </div> </ContentTemplate> </cc1:Accordion> </div> </form>
I built a simple dictionary for this example to do the data binding.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim values As Dictionary(Of String, String) = New Dictionary(Of String, String)() values("A") = "This is the value for A" values("B") = "This is the value for B" values("C") = "This is the value for C" values("D") = "This is the value for D" Accordion1.DataSource = values Accordion1.DataBind()
End If
End Sub
This is what my first attempt to set the labels in the code.
Protected Sub Accordion1_ItemDataBound(ByVal sender As Object, ByVal e As AjaxControlToolkit.AccordionItemEventArgs) Handles Accordion1.ItemDataBound
Dim myDictEntry As KeyValuePair(Of String, String) Dim lblHeader As Label Dim lblData As Label
myDictEntry = e.AccordionItem.DataItem lblHeader = e.AccordionItem.FindControl("lblHeader") lblHeader.Text = myDictEntry.Key lblData = e.AccordionItem.FindControl("lblData") lblData.Text = myDictEntry.Value
End Sub
I kept getting null reference exceptions on the 'lblData.Text = myDictEntry.Value' line. I went into the locals to see what was going on with my eventArgs. I rapidly found out that you don't want to touch e.Item*. Any attempt to look at these caused the debugger to drop. Not fun. I poked around extensively in e.AccordionItem which is an AccordionContentPanel. So it became apprent after digging around in the controls source that there are two types of ContentPanels in each AccordionItem. There is a Content and Header panel. And you can tell which is which by examining e.AccordionItem.ItemType.
This is the second attempt which now workd flawlessly.
Protected Sub Accordion1_ItemDataBound(ByVal sender As Object, ByVal e As AjaxControlToolkit.AccordionItemEventArgs) Handles Accordion1.ItemDataBound
Dim myDictEntry As KeyValuePair(Of String, String) Dim lblHeader As Label Dim lblData As Label
myDictEntry = e.AccordionItem.DataItem If e.AccordionItem.ItemType = AjaxControlToolkit.AccordionItemType.Header Then lblHeader = e.AccordionItem.FindControl("lblHeader") lblHeader.Text = myDictEntry.Key Else lblData = e.AccordionItem.FindControl("lblData") lblData.Text = myDictEntry.Value End If
End Sub
I was suprised how this particular attribute was buried so deeply in the eventArgs. I would have expected to see an e.AccordionItemType hanging out to make it a little more obvious. Overall, I do love this control. A nice way to present a large amount of content on a page without it running off the bottom of the screen. And the panel sliding is just too cool.
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.
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.
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.
|