What Was I Thinking?

Follies & Foils of .NET Development

  Home  |   Contact  |   Syndication    |   Login
  74 Posts | 0 Stories | 191 Comments | 0 Trackbacks

News

Archives

Post Categories

Check These Out

Gurus

Silverlight

Found this online, it proved VERY helpful and wanted to pass it along. Silverlight Error #2104 Could not download the silverlight application in IIS6 If you receive this error while trying to deploy your Silverlight application, make sure you did the following things: 1. Adjust the Content Expiration Setting You should adjust the content expiration setting to 1 minute. The following procedure outlines how to do this with IIS. Right-click your Web Site and select Properties from the context menu....
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

I’m a big fan of Resharper. Its loaded with refactoring and best practice guidance that makes me a better developer. I’ve also started working with .NET RIA services. The verdict is still out on RIA services, but I think I like them. Unfortunately RIA has an interesting approach to code sharing between the web and Silverlight project that's incompatible with Resharper. It used generated code that is technically excluded from the project. As a result, any code in my Silverlight project that references...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Silverlight bundles its executables into a single file with a XAP extension. This is really just a zip file. You can open the XAP and modify the contents just as you would any ZIP file. By default windows explorer doesn’t know how to open XAP files. The following reg file adds the metadata to tell Explorer to treat XAP files like compressed folders. I found this file somewhere on the internet, my apologies for not being able to site the source. Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.xap]...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Recently I had the need to implement support for Dynamic Linq queries in my framework project. For the uninitiated, Dynamic Linq allows me to write statements like this: var query = db.Customers.Where("City == @0 and Orders.Count >= @1", "London", 10). OrderBy("CompanyName"). Select("New(CompanyName as Name, Phone)"); where I can specify the predicates and selectors as string values. Microsoft has published a helper class that enables DynamicLinq support here -->C# Dynamic Query Library (included...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Manish Dalal wrote an excellent post on how to effectively data bind a silverlight combobox for foreign key scenarios. Using his approach, you create a ListProvider class that receives a DomainContext, internally loads the data into the context, and exposes the loaded data through an easily bound property. Having written a few of these, I’ve refactored the list provider functionality to a generic base class. The heavy lifting is done via reflection and it should be noted that my code assumes you...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

It appears Microsoft has removed the designer for XAML files from the latest release of Silverlight 3 Tools. The designer isn’t really gone, its just moved to the bottom of the editor and is hidden by default. To restore the designer view: 1. Open your .xaml file in the default vs editor. 2. Move your cursor to the bottom of the edit window (right underneath the horizontal scroll) and it should change to a split-style cursor 3. Click and drag up to reveal a pane that looks like the following: 4....
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati