Internet Explorer limits CSS and Script Resources to 30

March 5th, 2010 No comments

I ran into a weird bug recently that I hope no one else ever experiences.  I use Telerik’s Rad Controls for ASP.NET AJAX because they’re powerful, pretty and developer friendly.  I recommend them to ALL .NET developers.  I had just put together a server control that used several of Telerik’s controls and my own Rounded DIV Container control as well.  It looked great in all browsers.  I was happy.   I added another Rounded DIV to the page.  When I refreshed the page, all of my styles were gone.  I know the CSS is good, because I was using the control elsewhere.  Was it possible I had an unclosed tag somewhere?  I tried the page in Firefox…perfect, then Safari…perfect, then Google Chrome…perfect.

Scratching head…

At this point, I know it’s a browser issue, but I’m still not sure what’s causing it.  After digging around and playing with the Internet Explorer Developer Toolbar, I noticed that the page seemed to lose it’s style whenever there were more than 30 registers resources on a page (i.e. CSS & JavaScript file references).  I probably had too many CSS files as it was.  On top of that, I was dynamically referencing js files.  Telerik also register javascript and css files via the WebResource.axd (embedded .NET resources).

Here’s how you can check how many resources are registered for a given page:

  1. Check your markup
    1. Look for all instances of registered resources (CSS, JS, etc)
      <link id=”cssStyleSheet” rel=”stylesheet” type=”text/css” runat=”server” /> — each one of these counts as 1
    2. If you’ve got a lot of these, consider consolidating into fewer resources
  2. Use the IE Developer Toolbar, ChromeBug (Google Chrome) or FireBug (the best) to check for registered resources in WebResource.axd
    1. Firebug (ChromeBug is similar)
      1. Once the page is loaded, highlight the CSS tab and click the resource drop down list just below it
      2. Do the same thing on the “Script” tab (ASP.NET is close to 30! Watch out! :-) )
    2. IE Developer Toolbar
      1. In IE, press F12 to bring up the Developer Tools
      2. Click on CSS and count the items in the drop down list
      3. Do the same for Script

I hope you don’t have this many registered resources. :-)   But if you do, and things look weird in IE 7 and IE 8, now you know why.  Time to consolidate!

  • Digg
  • Twitter
  • Delicious
  • Facebook
  • LinkedIn
  • Share/Bookmark

How to Recover Deleted TFS Files and Folders

March 3rd, 2010 No comments

I recently went in search for a “how to” regarding file and folder recovery in Microsoft Team Foundation Server.  One of our project files was corrupted and removed its reference to an ascx file, but left the .cs and .designer.cs files behind; ultimately breaking the build on our continuous integration server.  Google doth continue to rock.  I quickly found a solution.   It’s relatively easy:

  1. In Visual Studio, click on Tools -> Options -> (make sure the “show all items” check box is checked) -> Source Control -> Visual Studio Team Foundation Server
  2. Check the “Show deleted items in the Source Control Explorer” check box
  3. Click “OK”
  4. In Team Explorer, open Source Control
  5. Then just right-click and click “Undelete” -> sooooo not a real word

Enjoy!

  • Digg
  • Twitter
  • Delicious
  • Facebook
  • LinkedIn
  • Share/Bookmark

Sync Files and Folders Between Computers

February 6th, 2010 2 comments

I have one music library on my iMac (running Snow Leopard) and another on my MacBook Pro (BootCamp – running Windows 7 Ultimate).  My wife purchases music on the iMac and I purchase from my laptop.  Sometimes we use iTunes, other times we use Wal-Mart.com.  Hence the need for a sync utility.  I came across Microsoft’s Live Sync while looking for a platform agnostic utility to sync my music library.

Live Sync

Windows Live Sync is an application and web service used to synchronize files and folders across multiple computers and with multiple users.  You can sync up to 20 different folders with up to 20,000 files each.  It also provides a nice web interface for browsing your remote computers’ hard drives (don’t worry, it’s all encrypted).

You can invite friends to share/sync folders and grant permissions as readers, contributors or owners.

In theory, this should have worked great.  My problem was that I already had folders that were out of sync with each other.  Live Sync seemed to have a hard time with this.  It was also quite slow in syncing 10+ GB over the internet.

I use this to quickly and conveniently access files on my home network from anywhere in the world.  This could also be a great solution for musicians who are working on a project remotely.  It’s a user-friendly, FREE way to sync your music projects.

Live Mesh

Live Mesh is another cool Microsoft product that gives you all the features of LiveSync, but adds support for remote desktop (requires ActiveX) and 5GB of online storage (not much, eh?).  Microsoft describes Live Mesh like this:

With Live Mesh, you can synchronize files with all of your devices, so you always have the latest versions handy. Access your files from any device or from the web, easily share them with others, and get notified whenever someone changes a file.  Use Live Mesh to connect to your other computer and access its desktop as if you were sitting right in front of it.

I downloaded the Vista x64 version for Windows 7 and it worked fine.  Very cool…and has it’s place…but it still didn’t meet my needs for reasons mentioned earlier. Live Mesh boasts future support for mobile devices, but has been advertised as “Coming Soon” for about a year.

Home Brew

So, I learned about a couple nice utilities from Microsoft that run smoothly on Mac, but at this point I’ve decided to write my own folder sync utility in C#.  It’s a console app right now.  I have the following config settings available:

  • Local folder location
  • Remote folder location (supports UNC paths for network shares)
  • Copy from local to remote
  • Copy from remote to local
  • Enable verbose logging
  • Log file location
  • Append or overwrite log file
  • Overwrite files if source is larger – if there are files of different sizes with the same name in the same folder. This option will overwrite the destination file if the source file is larger
  • File types to exclude (I use this because I don’t want DS_Store files copied to Windows and I don’t want desktop.ini or .lnk files copied to the Mac)

So far so good.  I copied 10 gigs of files in 5000 directories (on a local 100Mbps network) in about 20 minutes.  This could come in handy if you need to sync a local folder with a network share at work.  Thoughts from the peanut gallery?  Should I turn it into a windows app and post it here for download?

Click here to check out a great blog post about Live Sync, Live Mesh and SkyDrive.

  • Digg
  • Twitter
  • Delicious
  • Facebook
  • LinkedIn
  • Share/Bookmark

Can’t Synchronize TFS Warehouse after upgrading SQL Server to 2008

September 29th, 2009 No comments

I recently upgraded our TFS server from SQL 2005 to SQL 2008.  Since then, my remaining work report hasn’t run.  This makes me sad.  Bill Wang explained the reason for this and I’m grateful for it.

In a nutshell, there needs to be an assembly redirection.  This takes place per a couple settings in two (2) different web.config files.  Modify the config files in C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Web Services\Warehouse\web.config AND  C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Tools\SetupWarehouse.exe.config as follows:

      <dependentAssembly>
        <assemblyIdentity name="Microsoft.AnalysisServices"
                          publicKeyToken="89845dcd8080cc91"
                          culture="neutral" />
        <bindingRedirect oldVersion="9.0.242.0" newVersion="10.0.0.0"/>
      </dependentAssembly>

Restart IIS, then send Bill Wang a thank you note!

  • Digg
  • Twitter
  • Delicious
  • Facebook
  • LinkedIn
  • Share/Bookmark
Tags:

Windows 7 Sticky Notes Grievence

September 28th, 2009 1 comment

Windows 7 Sticky NotesSticky notes are cool.  I love taking a quick, digital note with the assurance that it will both be saved and save the environment; albeit one leaf at a time.  No need to litter the cubicle with 3×3 pieces of paper, right?

So Microsoft lifted a decent idea from MAC with the sticky notes as a widget in Windows Vista.  It’s even better in Windows 7. BUT!…There’s always a big “BUT”.  Let’s talk about Windows 7’s big “BUT”.

You know that little “x” at the top right of all of your windows applications since, oh I don’t know, Windows 3.1?  Closes the application, right?  WRONG!  Apparently, Microsoft decided to make it DELETE YOUR NOTE in Windows 7.  If I was a swearing man, now would be the time.

In Microsoft’s defense, you’ll be warned with a dialog like so:

StickyWarn

If you’re like me, you checked the checkbox long ago and forgot all about it.  If you want to bring the warning back, you can do so by modifying your registry.  Set the \HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\StickyNotes\PROMPT_ON_DELETE DWORD to “1″.

Microsoft trained me for years to press Ctrl+S to save and then click the “x” to close the application.  My sticky note was a victim of Pavlov’s theory.

  • Digg
  • Twitter
  • Delicious
  • Facebook
  • LinkedIn
  • Share/Bookmark
Tags: