Friday, April 25, 2008

Copy/Paste VS Error Message Pop-ups: Thank you VS Team!

You've been there: big long error message within a pop-up...need to copy/paste it into a search dialog...blast, can't copy!

The fine folks on the Visual Studio team have changed all that. Thank you! (It's the little things in life...)

Wednesday, April 23, 2008

Inaugural COALMG Meeting: Tuesday April 29th

Announcing the first meeting of the Central Ohio Application Lifecycle Managment Group (COALMG). First, check this post to discover more about Application Lifecycle Managment (ALM).

To accommodate the schedule of our speaker, we've moved our meeting this month to Tuesday April 29th from 5:30-7:30pm at the Polaris Microsoft office. (Normally, we meet every other month on the 1st Thursday, opposite the user group.) Our web site is Look forward to seeing you there!

Writing Maintainable and Robust Applications with Visual Studio Team System

Meeting Date & Time: 4/29/2008 5:30PM

Session Description:
Microsoft Visual Studio Team System is an extensible, life-cycle tools platform that helps software teams collaborate to deliver modern, service-oriented solutions. Visual Studio Team System is designed so every role in the development team has an integrated, seamless experience with the tools they are most comfortable with. Code Analysis, Code Metrics, Code Profiling, and Unit Testing are tools that are part of Team System and can be used through the software development lifecycle to improve quality. The impact of software defects is one of the reasons it is difficult to control the costs of the development and deployment activities on software projects. It is commonly accepted that defects that get resolved later in the development cycle cost more to fix. Learn how you can reduce defects by using the tools provided in Visual Studio Team System Developer Edition 2008.

Speaker Bio:
Randy Pagels - ALM Technology Specialist, Microsoft Corporation
Randy is an Application Lifecycle Management (ALM) Technology specialist for the Heartland District providing expertise on the Visual Studio Team System and Team Foundation Server products. He helps customers get the most out of their ALM tools by explaining best practices, installation, and configuration through presentations, workshops, or quick starts. Prior to Microsoft Randy worked as a developer for 16 years in the IT area of DTE Energy. He has architectured and development many .Net web applications using agile methodologies.

What is ALM?

I'm asked this frequently. What is ALM? First off, the acronym stands for Application Lifecycle Management. Here's the WikiPedia write-up on ALM but essentially, it's the process and tools your team uses to construct software. Kind of like SDLC but a whole lot more.

The best explanation of ALM (I think) comes from Eric Sink who asks and answers "What is ALM? Traceability." Yes, it's long but worth the read.

We hope to answer this and lots of other questions about software development with the new group we formed called the Central Ohio Application Lifecycle Management Group (COALMG). Check it out. We hope to see you there!

Monday, April 21, 2008

CODODN: What's New in the ASP.NET 3.5 Extensions: Resources

Thanks for attending my presentation. Resources I referenced:

.Net 3.5 Enhancements Training Kit Download
Overview of ASP.NET 3.5 Extensions Preview
ASP.NET 3.5 Extensions Preview
(unrelated) Central Ohio Application Lifecycle Management Group: COALMG

Update 4/22/2008: Props to Dan Hounshell for finding this CODODN video. I'm in there 2-3 times. Nice!

Friday, April 18, 2008

CODODN What's New ASP.NET 3.5 Extensions

In advance of my presentation, I'm posting the slides and sample projects on SkyDrive. Hope you enjoyed the presentation and please post questions and/or comments here. Thanks for attending.

Sinus Relief: My Approach

Quick off-topic post about allergy relief...

I've been plagued by allergies since childhood: trees, cats, dogs, ragweed, you name it. I've been on every drug on the list. I can remember being sick every Easter and every birthday (end of September) for...well ever. A few years ago, I consulted an allergist who ran me through a series of tests, determined my exact allergies, and gave me some solid guidance.

Following my allergist's advice, I've not been 100% allergy/cold-free but I've noticed a significant improvement. His recommendations:
  1. Exam from an Ear, Nose, and Throat (ENT) doctor. I have a slightly deviated septum and some nasal dollops but otherwise, nothing horrid. He checked my jaw, my hearing...all kinds of stuff. Fortunately, nothing major is/was wrong. He did recommend I wear a mouth guard at night to prevent teeth grinding (which may cause eustachian tube clogging).
  2. Take a daily Loratadine (generic Claritin).
  3. Daily Fluticasone steroid nasal spray (generic Flonase).
  4. NeilMed Sinus Rinse in the morning and before bed.
  5. (I think I came up with this one but...) Wear a particulate mask (just one of the cheap ones) when mowing the lawn. I'm sure the neighbors think I look like a weirdo but [without scientific evidence] it helps keep the dust and particles from getting into my sinuses...and causing infections.
The NeilMed Sinus Rinse is the big one for me. I'd done the other drugs for a while with limited success. The sinus rinse is similar to a neti pot...if you've heard of that. Essentially, it's a saline rinse for your sinuses. It's awkward at first but the benefits are tremendous--significantly fewer sinus infections!

I hope you find relief from your allergies. Looks like this spring will be rough.

Wednesday, April 16, 2008

Upgrading TFS Beta 2 to RTM

I have a client migrating to TFS 2008 who was leveraging an old version: 2008 Beta 2. We had difficulty getting the RTM software bits so I ended up extending the license for 30-days. (previous post) Well, it expired yesterday. Arg.

We finally got the RTM bits and I'm upgrading now. My steps:
  1. Follow the uninstall steps to the letter. Get rid of all that old stuff!
  2. Backup your existing TFS databases.
  3. Kick off the TFS 2008 installation and follow instructions
  4. Restart
  5. Install everything else you need: Build, Proxy, Explorer, etc. Oddly, the installation utility must be re-executed and these services installed individually.
  6. Execute the TFS Best Practices Analyzer (BPA) found within the TFS 2008 Power Tools.
    (Good how to here on BPA from Richard Hundhausen.)
  7. Resolve issues discovered with the BPA tool.
My experience (pretty darn good):

The databases were updated automatically.

I received a "Processor type and speed do not meet recommendations." warning but pushed on...this is a proof-of-concept box.

Excuse you? I can't run the services under the account I'm installing under? Great...starting over.

Had some red flags with the Best Practices Analyzer but they were easily fixed. BPA is a great tool (check out this tool for other products as well: Sharepoint, SQL Server).

Tuesday, April 15, 2008

PowerShell Directory Clean Up Script

Just a quick post of a PowerShell script I leveraged to clear out a directory of files older than 7 days. Props to Jeffery Hicks.
powershell.exe -command "Get-ChildItem 'C:\Temp\' -recurse | where {$_.LastWriteTime -le (Get-Date).AddDays(-7)} | remove-item -recurse"
Tack on a -whatif to the end of the script to see what would be affected without actually executing the action. Very powerful. PowerShell. Solid PowerShell cheat sheet here

Entity Framework, Data Services to Release with .Net 3.5 SP1

The Entity Framework and ADO.NET Data Services will ship gold with the .NET 3.5 Service Pack 1. Now when that will release is anyone's guess...what's the over/under?

[I missed this but props to Michael Collier for catching it.]

Saturday, April 12, 2008

Central Ohio Day of .Net Schedule Released

Come see my "What's New in ASP.Net 3.5 Extensions" talk at 11:40AM. Here's the entire schedule. Hope to see you there!

Silverlight 2.0 Beta1 CrossDomain Issues

Preparing for my upcoming "What's New with ASP.NET 3.5 Extensions" presentation at the Central Ohio Day of .Net, I ran into a roadblock with my simple Silverlight demo.

I have a Silverlight application calling an ASP.Net Web Service (traditional ASMX). The Silverlight application is hosted on an ASPX page served up in an ASP.Net Web Application.

I kept receiving a mix of the following two errors:

An exception of type 'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.dll but was not handled in user code

Additional information: [CrossDomainError]


An exception of type 'System.ServiceModel.ProtocolException' occurred in System.ServiceModel.dll but was not handled in user code

Additional information: [UnexpectedHttpResponseCode]
Arguments:Not Found

Essentially, this is saying, "hey this control/page you're browsing on is trying to interact with something over on we're preventing it". Good for security, bad for demos.

Originally, when creating my Silverlight application, I chose the "Generate an HTML test page to host Silverlight within this project" option instead of creating a new web application. Bad idea. You'll always experience this cross domain issue using the HTML hosting page while calling a backend service. I quickly switched to a web application.

The easiest fix for me was to switch the web site and web service from using Cassini  localhost with dynamic ports to the machine name and named virtual directories.

Here's my original properties on the web service project:


I switched it to:


The fine folks at Microsoft even provided a helpful "Create Virtual Directory" button.

Within my Silverlight project, I also needed to update the Service Reference (orginal):


I switched it to:


After you Configure Service Reference (above), make sure you Update Service Reference (below) to update the configuration code built for you by Visual Studio:


Despite the Silverlight 2.0 Beta1 recent release, there is much traffic about this issue in the forums and on blogs. It's actually nothing new. I ran into this issue with Flash a while back. Another, more production-ready solution is to leverage a policy file indicating to the object (Silverlight, in this case) that it's ok to interact with a particular service on some other domain. This is a file named crossdomain.xml and/or clientaccesspolicy.xml. More information at "Some tips on cross-domain calls" and "How to: Make a Service Available Across Domain Boundaries".


Silverlight 2.0 and WCF

Silverlight Forums CrossDomainError

Wednesday, April 02, 2008

Shrinking WSS (Sharepoint) SQL Server Log Files

Yesterday, while migrating a source repository from StarTeam to TFS, I received the following error:
"TF30042: The database is full. Contact your Team Foundation Server administrator."
Excuse you? Sure enough, my 100+ GB drive was full on the server. But I'd only migrated around 1000 items. Surely SQL wasn't consuming 100MB per file.

Turns out (yes, there was a lot of crud on the drive but...) the majority of the space, almost 40GB was being consumed by the Windows Sharepoint Services WSS Content data and log SQL Server files. Huh? I still need to investigate and understand why this portal, which is 100% unused, grew so large. Regardless, here's what I did to resolve:

  1. Since this is not yet a production database, I flipped the SQL recovery option from Full to Simple for WSS Content and several other databases. Detail here and here.
  2. Executed the maintenance plan for all the databases to get backups and clear out some of these files. That didn't help much. The Auto_Shrink == true didn't assist us in trimming the file sizes.
  3. Executed the following SQL as described here to understand the space available.
  4. Executed the following SQL as described here to shrink the log file down to 1GB (1000MB)
  5. Checked the data
  6. Performed a second backup for safe keeping
In the end, I recovered more than 80% of the previously consumed hard drive. Check with your DBA and / or your Sharepoint admin should you encounter this issue in a production environment. I had the luxury of being a bit cavalier because I was in a near-empty, non-production environment.