Friday, October 29, 2010

Computing First and Last Day of the Month

I stumbled across this the other day and I thought it was so slick I would share.

This example computes the DateTime for both the first and last day of the current month.

var monthStartDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
var monthEndDate = start.AddMonths(1).AddDays(-1);

You can take the range even further by changing the “AddMonths” number.

Pretty slick.

Saturday, October 9, 2010

Issue: IIS7 “Reports” folder is requiring Windows Authentication

I’ve been working on a ASP.NET project that contained a sub folder call “Reports.” Oddly, every time I tried to browse to it under IIS7 I would get prompted with a “Windows Authentication” dialog.

I had never programmed this, and couldn’t figure out why it was required.

Turns out, the issue was with having SQL Server Reporting Services installed. SSRS by default uses the “Reports” virtual directory under port 80 as it’s Report Manager URL.

After I changed the “Report Manager URL” within the “Reporting Services Configuration Manager” everything was right with the world again.

I just thought I would share this with everyone in case someone else runs into the problem.


I’m using IIS7 and SQL Server 2008

Monday, May 10, 2010

Silverlight: When do Xap files get downloaded and when are they cached?

A friend recently asked me “When do [silverlight] xap files get downloaded and when are they cached [in the browser]?”

So, using fiddler, I set out to find that answer:

Here are my test results.

To prepare, I deleted my temporary internet files and closed my IE window so there is no iexplore process running on my computer.

  1. I load a new IE window - xap is loaded from cache
    1. which I found odd because I thought deleting the files would have wiped my temporary internet files
  2. I refresh the page (F5) - xap is loaded from cache
  3. I force refresh the page (Ctrl+F5) - xap is loaded from cache
  4. I do a clean and rebuild my solution, making a new xap file
  5. I refresh the page (F5) - xap is loaded from cache
  6. I force refresh the page (Ctrl+F5) - xap is loaded from cache
  7. I close my IE window so there is no iexplore process running on my computer
  8. I load a new IE window - new xap is download from server
  9. I refresh the page (F5) - xap is loaded from cache
  10. I force refresh the page (Ctrl+F5) - xap is loaded from cache
  11. I close my IE window so there is no iexplore process running on my computer
  12. I load a new IE window - xap is loaded from cache

Therefore, my testing shows a new xap is downloaded next time IE is restarted on the client.

Hope that helps someone.

Monday, April 12, 2010

Central Ohio Day of .NET 2010 is ON!

The date has been set: June 5th, 2010

The Central Ohio Day of .NET is a joint venture between the Dayton .NET Developers Group, Central Ohio .NET Developers Group, Cincinnati SQL Server Users Group and the Cincinnati .NET Users Group. The event originally was called the Cincinnati-Dayton Area Code camp and ran in 2006 and 2007 under that name. With the inclusion of the Columbus And CincySQL group the event has been renamed to the Central Ohio Day of .NET. The event is a FREE day of technology discussions devoted to helping the local development community grow. Please check back often for more information about Day of .NET events.

Day of .NET events are a series of mini-conferences organized by developers for developers. You can find out more about Day of .NET events, including seeing upcoming events, on the series website at

Registration is set to begin on May 2nd, 2010.

Help spread the word, blog it, tweet it, water cooler it, in short “pimp it.” CODODN 2010 is on!

And don’t forget your Blog Bling:

<a href=""><img border="0" src="" alt="Central Ohio Day of .NET"></a>

Wednesday, February 10, 2010

Google is phasing out Internet Explorer 6.0 support during 2010

I just got this in an email the other day.

Dear Google Apps admin,

In order to continue to improve our products and deliver more sophisticated features and performance, we are harnessing some of the latest improvements in web browser technology.  This includes faster JavaScript processing and new standards like HTML5.  As a result, over the course of 2010, we will be phasing out support for Microsoft Internet Explorer 6.0 as well as other older browsers that are not supported by their own manufacturers.


We plan to begin phasing out support of these older browsers on the Google Docs suite and the Google Sites editor on March 1, 2010.  After that point, certain functionality within these applications may have higher latency and may not work correctly in these older browsers. Later in 2010, we will start to phase out support for these browsers for Google Mail and Google Calendar.


Google Apps will continue to support Internet Explorer 7.0 and above, Firefox 3.0 and above, Google Chrome 4.0 and above, and Safari 3.0 and above.


Starting this week, users on these older browsers will see a message in Google Docs and the Google Sites editor explaining this change and asking them to upgrade their browser.  We will also alert you again closer to March 1 to remind you of this change.


In 2009, the Google Apps team delivered more than 100 improvements to enhance your product experience.  We are aiming to beat that in 2010 and continue to deliver the best and most innovative collaboration products for businesses.


Thank you for your continued support!



The Google Apps team


Google Inc.
1600 Amphitheatre Parkway
Mountain View, CA 94043

Guess people better start upgrading.

I’m glad Google is making this move. IE 6.0 makes developing good web applications very difficult. I hope it goes away very quickly…. IN A HUGE FLAMING BALL OF FIRE!!! ;-)

Tuesday, February 9, 2010

If you’re a technology startup and need a FREE* MSDN Subscription, you should look into BizSpark


I signed up and I’m loving every minute of of it. Once Kohnen Solutions was approved we received a retail MSDN Subscription. (Which contains any piece of Microsoft software I could ever need to get my company going. Operating Systems, Databases, Blend, Visual Studio Team System Team Suite (VSTS), the list goes on)

You’ve got to first be eligible. Are you:

  • Actively engaged in development of a software-based product or service that will form a core piece of its current or intended business
  • Privately held
  • In business for less than 3 years
  • Less than US $1 million in annual revenue

If you meet all of the above you might be eligible for BizSpark.

But software’s not the only thing, you get access to the Developer Network, 2 Technical Support Incidents, Discounts from Third Party Providers (I’m constantly getting snail mail discount offers), and so much more.


To sweeten the deal, you even get a certain level of access to Windows Azure

*Free for a while at least. When you leave the program you have to pay a fee of $100. (Hell, that definitely beats $10,939 if you buy it new. IMHO, BizSpark is worth it.)


Adding Code Samples to Blogger with Windows Live Writer

Sorry, if anyone got the slew of test posts I made in order to get my code formatter right.

But as a small reward for putting up with my bumbling, I give to you my findings.

I’m using Windows Live Writer with the “Code Snippet plugin for Windows Live Writer,” but I found when I published my posts my formatting was off. Many “<br/>” tags were appearing in my blog and RSS feed that came out of it.

The problem was not with the plugin, but with formatting my posts. So to fix the problem here is what you do…

  1. Log into you Dashboard
  2. Choose “Settings” for your respective blog
  3. Choose “Formatting” under the Settings tab
  4. Set “Convert line breaks” to “No”

Monday, February 8, 2010

Tooltip for TextBlock in Silverlight (and any other Silverlight control)

I’ve always been used to “.ToolTip” to add a tool tip text to a control. Unfortunately not all Silverlight controls have such a property.

However, Silverlight does provide a class called “ToolTipService” so you can add a Tooltip to almost all Silverlight UI elements.

You can use the class both in the XAML

   1:  <TextBlock x:Name="txtblkNotification" Text="My Textblock">
   2:      <ToolTipService.ToolTip>
   3:          <ToolTip Content="My tool tip for the TextBlock"></ToolTip>
   4:      </ToolTipService.ToolTip>
   5:  </TextBlock>

Or directly in code

   1:  ToolTipService.SetToolTip(txtblkNotification, "My tool tip for the TextBlock");

I hope someone else finds this useful. (I sure did)

Thursday, February 4, 2010

Because of Fiddler I could not browse the web after a power failure.

I was in the middle of debugging my network traffic with Fiddler when there was a power “hiccup” and my computer rebooted.

When I came back up, I opened an Internet Explorer window and could not reach any web address. I could “ping” but when I tried to browse to “” IE kept sending me back to “http:///”

I’ve learned recently the fiddler makes strong usage of a local proxy. I stared up fiddler again, and did a clean shutdown of the app. After this I was able to browse the web again.

Interesting experience I thought I would share it.

Now it’s time to get an Uninterrupted Power Supply.