08.11.08

Visual Studio 2008 / .NET Framework 3.5 SP1 Released

Posted in Uncategorized at 10:42 pm by TalynOne


Microsoft has released the highly anticipated .NET Framework 3.5 SP1, along with Visual Studio 2008 SP1. This is not your regular service pack, it’s chock full of new features and enhancements across almost all the major components of the .NET? framework. Here are the goodies:

VS 2008 Service Pack 1:

o? ? ? Executable: http://go.microsoft.com/fwlink/?LinkId=122094 (Direct Link)

o? ? ? ISO: http://go.microsoft.com/fwlink/?LinkId=122095 (Direct Link)

VS 2008 Express Editions with Service Pack 1:

o? ? ? Executable: http://go.microsoft.com/fwlink/?LinkId=123679

o? ? ? ISO: http://go.microsoft.com/fwlink/?LinkId=123680

VS Team System 2008 Team Foundation SP 1:

o? ? ? http://go.microsoft.com/fwlink/?LinkId=124829

.NET Framework 3.5 Service Pack 1

o? ? ? http://go.microsoft.com/fwlink/?LinkId=124150

Team Foundation Server

o? ? ? Team Foundation Server 2008 SP1 (TFS Installation Guide)

Here are some links you can read-up on to learn what’s new with SP1.

GPU-accelerated custom effects for WPF:

http://blogs.msdn.com/greg_schechter/archive/2008/05/12/gpu-accelerated-custom-effects-for-wpf.aspx

ScrollViewer.IsDefferedScrollingEnabled;AlternationCount;IEditableCollectionView:

http://blogs.msdn.com/llobo/archive/2008/06/05/new-features-scrollviewer-isdeferredscrollingenabled-alternationcount-ieditablecollectionview.aspx

http://blogs.msdn.com/vinsibal/archive/2008/05/20/wpf-3-5-sp1-feature-ieditablecollectionview.aspx

http://blogs.msdn.com/vinsibal/archive/tags/WPF+3.5+SP1/default.aspx

String Format:

http://blogs.msdn.com/llobo/archive/2008/05/19/wpf-3-5-sp1-feature-stringformat.aspx

Pixel Shader Effects in WPF SP1 Beta:

http://runtothehills.org/rob/archives/180

WPF WebBrowser:

http://blogs.msdn.com/llobo/archive/2008/06/12/wpf-webbrowser.aspx

Performance Enhancements:

http://phizzpop.visitmix.com/blogs/techniques/archive/2008/07/06/improving-your-wpf-3-5-sp1-controls-performance.aspx

http://blogs.msdn.com/jgoldb/archive/2008/05/15/what-s-new-for-performance-in-wpf-in-net-3-5-sp1.aspx

Tim Sneath’s Introduction of SP1 Beta (Lots of info):

http://blogs.msdn.com/tims/archive/2008/05/12/introducing-the-third-major-release-of-windows-presentation-foundation.aspx

WPF 3.51 SP1 Graphics with David Teitlebaum:

http://channel9.msdn.com/posts/AdamKinney/WPF-35-SP1-Graphics-with-David-Teitlebaum/

What’s new in VS2008 SP1 for WPF:

http://technorati.com/videos/youtube.com%2Fwatch%3Fv%3DLO1md7CODno

07.14.08

Expression Encoder Template Review

Posted in Silverlight at 10:13 pm by Cal

Expression Encoder is an application which allows you to “encode” a video for use with a Silverlight web application.? The term encode here principally means to compress the video to the extent appropriate for delivery via the intended delivery mechanism.? In general, encoding for Internet delivery will use a much higher degree of compression than encoding for delivery via DVD.

Since most users will expect to have a standard set of controls to Play, Pause, Rewind, etc. Expression Encoder includes a collection of different styles for these controls.? These styles are called Templates and appear on the Output tab in the Expression Encoder UI.? While it is possible to preview each of these Templates directly in the Expression Encoder UI, the size of the preview in my opinion is too small to make a particularly informed decision in choosing which one is preferable.

Expression Encoder Templates

So to help anyone who also would like to quickly review how these Templates look at a more convenient size, I have taken a series of screenshots which depict each option.? If you click on the images, an actual video will open in a separate window. Each such video offers a full size live preview of the selected style.



Blitz Template Example















Deep Zoom Photography

Posted in Deep Zoom, Silverlight at 1:16 pm by Cal

Silverlight 2 includes a nifty new feature called Deep Zoom which lets you post a very large photo on the Internet which then exhibits remarkably responsive zooming and panning capability.? Microsoft’s demonstration project is the Hard Rock Cafe memorabilia wall.? Given my ongoing interest in travel photography, Deep Zoom immediately caught my eye.? I watched the MIX08 video featuring Scott Stanfield and then recently attended his Bay.NET presentation in San Francisco in June.

I just happened to have a few panorama photos which I have taken over the years (but never really done much with).? So I dug out these photos and using PTGui, a stiching application recommened by Scott, I combined my photos into some large panorama images.? Then after some minor touching up in Photoshop, I used the Deep Zoom Composer to prepare these panoramas for use with Silverlight.? You can see the results at www.travelswithcal.com/deepzoom/

Orinduik Falls

The key to a successful DeepZoom photo is a large enough image that allows zooming in to some meaningful level.? If you just take a standard 8 - 10 megapixel photo,? a user won’t be able to zoom in for very far until the image begins to seriously degrade.? (In this respect, I strongly recommend putting an upper limit on the permissible zoom since it makes very little sense to allow a user to zoom in beyond the point where the image begins to completely deteriorate.)? ? Given that most stitching software recommends between a 33 and 50 percent overlap between the photos to be combined, I would estimate that in most cases a 3 or 4 photo composite would be the smallest possible image that would give you a satisfactory Deep Zoom result.? Obviously, the larger the original image, the more zooming that can be achieved.

A friend and I are planning to take some San Francisco photos on July 26 with a view to creating some Deep Zoom panoramas.? What we are hoping to determine is whether following the correct procedures for image preparation can lead to some stunning results.? Stay tuned.

05.10.08

Migrating a Silverlight v2 Beta 1 application that uses SQL Server 2005, WCF, LINQ, and ASP.NET v3.5, on the cheap, to GoDaddy.com

Posted in LINQ, SQL Server 2005, Silverlight, Visual Studio, WCF, XAML, XBAP at 8:36 pm by TalynOne



Recently I was involved in a project that used Silverlight v2 beta 1, SQL Server 2005, and a WCF service using LINQ in an ASP.NET v3.5 project. A link to an article describing this project will follow soon.

When looking for the most affordable web host that would support this application, fellow blogger & Silverlight aficionado Alan Cobb suggested GoDaddy.

GoDaddy's Windows Economy Plan seemed to fit the bill, it gave me access to 1 SQL Server 2005 database, ASP.NET v3.5 support, running under IIS v6 or v7 for around $9 for two months. That's a price that's hard to beat, but would it work? The short answer is yes, the long answer is that it requires some teeth pulling. I'll explain the gotchas, tips, and modifications necessary to successfully deploy such an application under GoDaddy's Windows Economy web hosting plan.



Silverlight MIME Types

When setting up a new web hosting account with GoDaddy, choose IIS 7, not IIS 6. With a new GoDaddy IIS 7 plan all the necessary MIME types should already be registered for you.

You may be asking, wait a minute, Silverlight is a client side technology, it should be supported on any web server, right? Well that's mostly correct. It is supported on any web server, as long as that server has the Silverlight required MIME types registered. When the Silverlight plug-in requests certain assets (such as .xaml or .xap files) it requires the web server hosting those files to have the correct MIME types registered for those file extensions. Every web server worth a grain of salt lets you configure MIME types. Though every web host, may not give you direct access or the ability to do so.

The Silverlight related MIME types include:

Extension MIME Type
.xap application/x-silverlight-app
.xaml application/xaml+xml
.xbap application/x-ms-xbap


The .xaml MIME type is mostly used by Silverlight v1.0 applications.

The .xap file is where all the Silverlight v2 assets are stored. It's stored in the "ClientBin" folder in a Silverlight v2 application. It's actually just a ZIP file, you can open it in any .ZIP capable application to see what's inside. The files inside typically include a .xaml file (the UI), Silverlight assemblies (.dll files), and embedded resources (.jpg,.wmv, etc..).

The .xbap MIME type is not necessary for Silverlight applications, but could be useful if you wish to deploy WPF XBAP applications.

When I initially created my GoDaddy account, I set it up as an IIS 6 account. I'm much more familiar with IIS v6 than v7, so I chose IIS v6 with the thinking that it's better to go with the devil you know. The IIS v6 account did not have the .xap MIME type registered. The symptom was that the Silverlight plug-in loads fine, but the application shows up as a blank white canvas, as the plug-in can't/didn't download the .xap asset properly. Tip to Microsoft: If the .xap asset can't be downloaded/processed properly in a timely manner, please show an error message, a blank white canvas is a bit disconcerting.

If you already have or must have IIS 6 under GoDaddy (if you need FrontPage Extensions, ColdFusion support, or have other reasons such as this or this), the following are your choices:
  1. Contact GoDaddy support and have them add the necessary MIME types for you. Some have had good luck with this, I did not.

    <Bad Customer Experience Rant Start>

    First, you should know, any support ticket under the Economy plan takes up to 24 hours to process (usually fewer than 12 hours). I guess you get what you pay for. Second, when I put in a ticket for them to add the MIME types they responded by e-mailing me information on how to do so myself using a web.config under IIS 7. That's all fine and dandy, but I was on a IIS 6 account, and the ability to configure MIME types using web.config files is only supported under IIS 7. So I got my support ticket re-opened and escalated. They responded that the MIME type would be added within 12 hours. After 12 hours, when my Silverlight application still did not work, I called in again and they informed me that the techs said the MIME type has been configured. When I explained that it had not been done properly, the rep, in not so many words, said, it is configured properly, I can't talk to the IIS admin directly, and that I don't know how MIME types work under GoDaddy. At this point I said screw it, I'm not going to get anywhere with this doofus, I told him to migrate me to IIS 7. Migrating from IIS 6 to IIS 7 under GoDaddy means canceling out my current IIS 6 web hosting account, getting a refund, and signing up for a new hosting account, this time choosing IIS 7 when setting up the account. After this was done, I was able to run simple Silverlight applications just fine without any additional configuration.

    </ Bad Customer Experience Rant End>

  2. Brad Abrams suggests a workaround where you rename the .xap file to .zip, and change the reference to the new extension in the application's .xaml file, and in the .aspx/.html file that hosts the Silverlight control.
If you're on another web host that's running IIS 7, but doesn't give you direct access to IIS MMC, you can configure mime types using a web.config file using this guide. Don't do this on a GoDaddy IIS7 account! Placing these directives in a Godaddy IIS 7 account, which already has these MIME type configured, will cause the server to spit out server configuration errors. Under IIS 6, these directives are ignored.

If you're hosting on your own IIS server, or on a different web server that gives you full access to the IIS 6/7 MMC, read this link for information on how to configure the MIME types.



WCF Services on web hosts with Multiple IIS Identities (GoDaddy)

WCF services hosted on IIS can only have one base address. Under some hosting configurations, such as GoDaddy's shared Windows Economy Plan, multiple base addresses exist. When attempting to access WCF services on an IIS with multiple base addresses, an exception similar to the following occurs:

This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
Parameter name: item
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
Parameter name: item

The solution, using a combination of information found here and here, is to create a custom service factory and override the "CreateServiceHost" method. For Godaddy, I need to have it return the second base address found. The code below only returns the second base address when more than one exists, otherwise I return the first base address. This way I can share the same code base when using my local IIS/ASP.NET server, and GoDaddy IIS servers You may need to modify this code to return a different/custom base address depending on your application's needs.

Simply add the following class, as a sister class, in the service code behind file (yourservice.svc.cs):
protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
{                       
    // If more than one base address exists then return the second 
    // address, otherwise return the first address
    if (baseAddresses.Length > 1)
    {
        return new ServiceHost(serviceType, baseAddresses[1]);
    }
    else
    {
        return new ServiceHost(serviceType, baseAddresses[0]);
    }            
}


Then edit the markup in the .svc file (yourservice.svc), by adding the following attribute to the "ServiceHost" tag: (You can edit this file in any text editor, or by right-clicking on the file in Visual Studio 2008 solution explorer, and choosing the "View Markup" menu item):
Factory="YourWebProject_Web.CustomHostFactory"


WCF .svc files and GoDaddy

For some reason GoDaddy's IIS 7 server configuration doesn't have the buildprovider extension configured for the .svc file extension. This is easy enough to fix. Simply go to the ASP.NET project application folder and open up the web.config file, under the "<compilation>" tag, which is under the "<system.web>" tag, add the following directive:

<buildProviders>
    <add extension=".svc" type="System.ServiceModel.Activation.ServiceBuildProvider, 
         System.ServiceModel, Version=3.0.0.0, Culture=neutral,
         PublicKeyToken=b77a5c561934e089"/>
</buildProviders>




Setting up SQL Server on GoDaddy

This page has information how to create a SQL server database on the GoDaddy account. When you set up the database, you don't need the "DSN" option, as that's for older ODBC connections, which we won't be using. You should check/include the "ASP Schema" option. Don't worry, if you missed these options when you set up the database, you can go edit the database properties through GoDaddy's interface to add/remove these options as needed.

Exporting local SQL Server database to GoDaddy

If you wish to export a local SQL Server 2005 database schema/data to GoDaddy follow the infromation provided here & here.

Configuring LINQ/ASP.NET/WCF to connect to the GoDaddy SQL Server

  1. Find the database host address, database name, user id, and password for the SQL Server you wish to connect to. Information on how to do that is here
  2. Edit the web.config and find the "<connectionStrings>" section, change the "connectionString" attribute to:
    connectionString="Server=SQL_HOSTADDRESS; Database=SQL_DBNAME; User ID=SQL_USER_NAME; Password=SQL_DB_PASSWORD; Trusted_Connection=False"




Setting up IIS Application folder on GoDaddy

For ASP.NET application to work correctly, the folder that it's contained in must be set as an application folder. To do this on GoDaddy:
  1. Logon to the web hosting account ("Hosting & Servers" menu, "My Hosting Account" sub menu item).
  2. Click on the "Manage Account" link next to the domain you wish to configure.á
  3. Under the "Content" menu item, choose the IIS Settings sub menu item.
  4. Click on the "Create" button and set the "Directory Name:" textbox value to the same name as folder you wish to place the ASP.NET application in.
  5. Make sure to select the "Set Application Root" option.
  6. Press the "OK" button.
Configuring a Cross-Domain Policy File (clientaccesspolicy.xml)

If you wish to debug a Silverlight application, which accesses an on-line server's WCF service, through a locally running instance of Visual Studio, you must configure a cross-domain policy file. You may also need a cross-domain policy file configured if the base address returned by "CreateServiceHost" is not interpreted as a local address by the WCF service (covered in the "WCF Services on web hosts with Multiple IIS Identities (GoDaddy)" section above).

For a full explaination of how to create cross-domain policy files, this article is a good read.

Karen Corby's three part article on site of origin, cross domain communication, and configuring a cross domain policy file is also a good read on the details of how Silverlight handles communication.

Uploading the project

I always found it surprising that there's very little documentation detailing which files are actually need for a deployed application to run. When you look at the solution file you will see many files (.sln, .csproj, .aspx, .dll, .dbml, .cs, .svc, folders, etc...). But to deploy an application only a few of these files and folders are needed. The folders/files that actually needed for an application to run include:
  1. Any .aspx and/or .html files that the application uses. A Silverlight web application project usually creates a default.aspx and default.html, which aren't actually used/needed for anything. You probably will want to rename the startup .aspx or .html file to default.aspx or default.html. When the startup file is named "default.aspx/default.html" then users can access the application without specifying the application file name (http://www.yoursite.com/yourappfolder/ instead of http://www.yoursite.com/yourappfolder/yourapp.aspx).
  2. The WCF .svc file, this file associates a service with its implementation and is the means for IIS to create a ServiceHost for you. For further reading, this article details hosting and consuming WCF services.
  3. The "web.config" file in the web project folder. Information on the web.config file can be found in many places, including here, here, and here.
  4. The "bin" folder (ASP.NET assemblies) in the web project folder.
  5. The "Clientbin" folder (Silverlight assemblies/assets) in the web project folder.
  6. Any assets referenced by Silverlight, HTML, and ASP.NET sources, such as images, videos, etc...


Reconfiguring Silverlight WCF Service Reference Location

If the Silverlight application is currently pointed to a locally hosted WCF service location, and you wish to point it to an on-line/different WCF service location, the process is simple.
  1. Go to the Visual Studio Solution Explorer, and right-click on the server reference (under the "Server References" folder)
  2. Choose the "Configure Service Reference" menu item.
  3. Set the "Address:" text box value to the URL of the WCF .svc file (http://www.yourserver.com/yourappfolder/yourservice.svc).
Debugging Silverlight/WCF

03.05.08

Mix ‘08 Report

Posted in Silverlight, WPF at 4:21 pm by TalynOne

Mix is an annual event held by Microsoft to showcase and introduce their latest web and designer development technologies.

It’s being held right now (March 5-7) in Las Vegas.

I recommend watching the Key Note which has great demos showcasing IE 8 Beta 1, Silverlight 2 Beta 1, Silverlight for Windows Mobile and Nokia devices, and upcoming enhancements coming in a service release that builds on top of .NET 3.5/VS 2008.

Here’s some interesting news (updating as news comes in):

Internet Explorer 8 Beta 1

  • Video: First Look at IE8 Activities and WebSlices
  • Available for download now
  • It’s recommended that you don’t install this on any production machines. It’s best to try beta 1 on a test/virtual machine. You can get Virtual PC image of Windows XP SP2 with IE8 : HERE.
  • IE8 will overwrite IE7. The browser does have an IE7 mode (who knows how well this works, since this is a beta version). Uninstalling IE8 beta 1 should restore your previous (IE7) installation, though your browser settings/preferences may be reset.
  • Beta 1 doesn’t pass ACID2 Test. Though there is rumor that an internal build does pass it. mritche says that the reason IE8 doesn’t pass ACID2 is because it makes a cross-domain reference that the security model in IE8 doesn’t appear to allow right now.
  • Per-site ActiveX controlled via the UI, registry, or programmatically within the control itself.
  • Non-admin ActiveX on Vista so (1) you don’t need to elevate to install controls that don’t need it and (2) their scope is limited to that user rather than the whole system.
  • Loosely-coupled IE - this puts the main IE frame and tabs in separate processes so that if one tab crashes it doesn’t take down everything else. There’s a lot more asynchronous calling happening behind the scenes which should make IE8 feel ’snappier’ (caveat: when in IE8 mode performance was not that great for me, as you’d expect out of a beta, but I notice things are more responsive under IE7 emulation).
  • Automatic crash recovery so that if a tab crashes or hangs, it can be restarted without losing your work. For more serious failures, it’ll restore your set of tabs if the frame dies.
  • Check out/contribute to the Microsoft IEBlog.

Silverlight 2 Beta 1

Upcoming .NET Framework/Visual Studio 2008 Enhancements

  • Support for writing custom WPF shader effects, hardware accelerated through the GPU for low CPU utilization. Can can be applied to videos, images, buttons, etc..
  • Improved .NET Framework Setup for Client Applications (easily bootstrap a .NET framework install)
  • Faster cold start times. Depending on the size of the application, .NET applications are expected to realize a cold startup performance improvement of between 25-40%. Applications do not need to change any code, nor be recompiled, in order to take advantage of these improvements so the benefits are automatic.
  • Hardware accelerated WPF DropShadow and Blur bitmap effects (previously software rendered, APIs wil stay the same).
  • Substantially faster Visual and DrawingBrush performance.
  • Faster media and video performance.
  • New WriteableBitmap API (enables real-time bitmap updates from a software surface).
  • Container recycling and data virtualization support (for data scalability)
  • Planned (later this year) release of a number of new controls for WPF. Included in the list are DataGrid, Ribbon, and Calendar/DatePicker controls.
  • Servicing update of VS 2008 that includes a number of feature additions to its WPF designer. These include event tab support within the property grid for control events, toolbox support within source mode, and a variety of other common asks and improvements.
  • Detailed Info : HERE

Other links of interest:

  • Mix University - Get your learn on through videos and exercises covering Silverlight, WPF, ASP.NET AJAX, Gadgets, Expression, Internet Explorer Extensions, Media Center, RSS, Virtual Earth, and Windows CardSpace.

09.02.07

WPF Job Tracker Weekly Update

Posted in Job Tracker at 11:20 pm by Cal

Missed a couple of weeks due to my trip to Asia.? Here are this week’s figures from Dice for progress in job postings for C# and WPF:

WPF All of Dice: 125
Silicon Valley: 4

Blend All of Dice: 1
Silicon Valley: 0

Silverlight All of Dice: 30
Silicon Valley: 1

C# All of Dice: 7834
Silicon Valley: 247

WPF jobs have more than doubled since I started tracking this five months ago and Silverlight jobs have more than doubled in just over two months.?

08.13.07

Fall Registration at Foothill College Now Open

Posted in Classes at 1:25 am by Cal

Fall term registration at Foothill College is now open again.? Classes begin on September 24 and run for twelve weeks until December 14.?

KCI Southern View

We have a broad selection of .NET related classes this fall including

? Windows Presentation Foundation (CIS-019M)
?
? Expression Blend (with coverage of Silverlight) (CIS-019K)
?
Windows Communication Foundation (CIS-019L)
?
ASP.NET (CIS-019W)

Windows Forms Development (CIS-019D)
?
? Visual Studio Tools for Office (CIS-019V)
?
Scripting for Windows Administrators (CNET-060J) ? ? ?
?
All of these classes will be available online.? ? In addition, two of these clases will also be offered in a traditional face to face setting.? WPF will meet every second Tuesday? evening from 6:00 - 9:00 PM starting on September 25, Expression Blend will meet every second Tuesday? evening from 6:00 - 9:00 PM starting on October 2.? Anyone attending either class is welcome to attend the other face to face sessions as well.? ?

Tuition costs are under $100 for California residents.? Even non-California residents need only pay around $400 per class.?

WPF Job Tracker Weekly Update

Posted in Job Tracker at 12:45 am by Cal

August 13, 2007

Here are this week’s figures from Dice for progress in job postings for C# and WPF:

WPF All of Dice: 116
Silicon Valley: 7

Blend All of Dice: 1
Silicon Valley: 0

Silverlight All of Dice: 22
Silicon Valley: 2

C# All of Dice: 7516
Silicon Valley: 252

Continuing improvement this week in the figures for WPF and Silverlight.? ?

07.21.07

WPF Job Tracker Weekly Update

Posted in Job Tracker at 11:24 pm by Cal

Here are this week’s figures from Dice for progress in job postings for C# and WPF:

WPF All of Dice: 98
Silicon Valley: 5

Blend All of Dice: 2
Silicon Valley: 0

Silverlight All of Dice: 15
Silicon Valley: 0

C# All of Dice: 7361
Silicon Valley: 245

Some more improvement this week in the figures for WPF.

07.13.07

WPF Job Tracker Weekly Update

Posted in Job Tracker at 1:24 am by Cal

July 12, 2007

Here are this week’s figures from Dice for progress in job postings for C# and WPF:

WPF All of Dice: 87
Silicon Valley: 4

Blend All of Dice: 4
Silicon Valley: 0

Silverlight All of Dice: 15
Silicon Valley: 1

C# All of Dice: 7240
Silicon Valley: 223

Very little change from week to week.

« Previous entries