August 27. 19:19 -  Bingo - A professional game for old people.

Problem connecting to an Access database on x64

April 26, 2009 22:11 by docbliny

I know I’ve seen the solution to this one somewhere, but if you’re getting the following error on a 64-bit platform, the solution is to set your application to compile as “x86” and not “Any CPU”:

ERROR: 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.

image


Using BBAuth with the Yahoo! Address Book

April 25, 2009 12:11 by docbliny

There have been several people requesting help using the Yahoo! Address Book web services in the .NET Developer Forum. People are getting 403 or 404 error codes back.

I did some digging into the issue this morning and the cause for the 404 error turns out to be an invalid URL for the DOCTYPE declaration for the returned XML data. In short the URL http://l.yimg.com/a/lib/pim/r/abook/xml/2/pheasant.dtd set as the DOCTYPE for the resulting successful web service call XML data is invalid.

This causes problems when using the Yahoo.Authentication class methods, such as GetAuthenticatedDataSet(), resulting in a 404 when the .NET XmlReader attempts to validate the data against the DTD.

The way to work around this issue is to use your own XmlReader with custom XmlReaderSettings specifying to ignore the DTD.

More...

Out of Browser with Silverlight 3

March 18, 2009 14:46 by docbliny

One big surprise for me was that out of browser support made it into version 3. While it is nowhere near as comprehensive as Adobe Air, its main advantages are that users don’t need a separate runtime download and for developers the programming model is pretty much the same for in and out of browser.

View the session.

 

Installation

Installing a Silverlight application is easy for the user, and making an application available is easy for the developer.

  • Shortcuts can be placed on desktop and Start-menu.
  • No Control Panel Add/Remove Programs item added (listening to feedback).
  • Right-click: Remove this application.
  • Multiple icon sizes can be provided. Must be PNGs (transparency supported).
    • Install dialog
    • Taskbar
    • Window
  • Applications can be “previewed” in the browser before installation since the application is the same in both the browser and out.

Detaching APIs

“Detaching” is the term of moving (installing) a Silverlight application from browser onto the desktop.

  • Manifest
    • Name, Title, and Description
    • Application icons
  • APIs on Application
    • Detach method (must be called from a user interaction)
    • ExecutionState property
    • ExecutionStartChanged event
    • RunningOffline property

Updating Applications

  • Optimized for “instant on”. No check for “new version” is done when the application starts.
  • Silverlight downloads update in the background.
  • Next application launch runs the new version.
  • Event raised when an update has been downloaded. This lets you prompt the user to restart the application if necessary.

Network Availability

  • Network access information is key for out of browser applications
  • Silverlight adds functionality
    • IP address changed event
    • Network availability property
      • Any net interface, connected, not looped back
  • Best practice is to “ping” server by attempting to download a small file when state changes and a valid IP address exists. There maybe cases where the network is “available”, but limited to the local network (automatically generated private IP address).

Saving Data Locally

  • OoB Isolated Storage limit is increased to 25MB
    • Limit is increased when the application is detached
  • SaveFileDialog
    • Allows you to set file types (filter)
    • Application gets access to a Stream, but not the path

Details

  • HTML DOM Bridge is not available
  • Shortcuts point to a small Silverlight host application that contains a browser instance
  • LocalLow\Microsoft\Offline\[ApplicationName]
  • LocalLow\Microsoft\is\[random]\[random]\[etc…]
  • Bundles are used on Macs

Debugging

  • Use MessageBox for startup with Application_UnhandledException
  • Use Attach to Process on slhost.exe in Visual Studio. Will be improved post beta.

Differences vs. In Browser

  • Additional key access (Function keys for example)
  • No HTML DOM Bridge
    • No mouse wheel
    • No XmlHttp
  • Currently no HTML interop or rendering.
  • Out of browser will currently always have operating system window chrome.

Best Practices

  • (See above for network availability testing)
  • Download local data in the OoB instance after the application has been detached. 
    • Check RunningOffline to see if you’re out of browser
  • Don’t fire off more than one HWR at a time.
  • Keep all your code in the XAP
    • Silverlight versions for you making updates easy to manage
    • Assets can go outside
  • If your data model changes, require a restart.
  • Show UI for major updates so user knows things have changed.

Links

Mike Harsh’s Slidentity Silverlight “PowerPoint” application.

MSDN pre-release documentation.


What's New in Silverlight 3

March 18, 2009 12:54 by docbliny

Here’s a quick rundown (mostly of the slide content) presented by Joe Stegman. View the session.

As I mentioned in my previous post, there were a couple of nice surprises that I didn’t believe wouldn’t make version 3, but in addition to those there are a ton of new features as listed below.

 

Graphics

  • Perspective 3D
    • Rotate any visual object by its X/Y/Z axes
  • Effects and Pixel Shaders
  • Pixel APIs
    • Dynamic bitmap generation
    • Render a visual tree (elements) to a bitmap
    • Image editing and effects
    • Clone visuals
    • DirectX SDK used to generate

Raw Audio/Video APIs

  • Dynamic sound generation
  • Custom audio/video decoders

Local Messaging

  • Cross plug-in Silverlight communication: cross plug-in/tab/browser/out-of-browser
  • Shared memory implementation
  • Exposed like "named pipes"
  • String based messages only (no byte-based, maybe later based on feedback)
  • Same domain required with opt-in

UI Framework Improvements

  • Merged Resource Dictionaries
  • BasedOn Styles
  • Styles can be “cleared”
  • Multi-select ListBox
  • Listening to “handled” routed events
  • New VSM “Invalid” states
    • Supported on TextBox, CheckBox, ComboBox, ListBox, RadioButton, PasswordBox (coming later)

Other Improvements

  • SystemColors
    • Especially useful for “high contrast” settings
  • Text Improvements
    • ClearType Text (post beta)
    • CaretBrush (SL 2 caret was black)
    • Flag to optimize for animating text
    • Glyphs support for system font
  • Image Refinements
    • Getting size
    • Bypass cache

New SDK Controls

  • DockPanel
  • Expander
  • Label
  • etc

Other Big Additions

  • Save File Dialog
  • Navigation Framework
    • “Native” integration with the browser history
  • Data Control Additions
  • SEO Support
  • n-Tier data support
  • Binary XML, SOAP faults, Credentials

Out of Browser

  • Silverlight runs sandboxed on desktop
  • Built into the core Silverlight runtime
  • Enabled per “application”
    • Manifest update required
  • More storage space by default: 25MB
  • User gesture required to take “out of browser”
    • Right-click context menu option
    • Custom buttons (user action required to trigger event)
  • New networking APIs
    • Connected, disconnected and changed state
    • Available in the browser, too
  • Offline APIs
  • Launch state, update APIs
  • Add icon to install dialog
  • “Take a XAP offline” – easy to deploy if everything is in the XAP. Doesn’t have to be.

Miscellaneous

  • No printing support.
  • No FlowDocument.
  • 3 behavior changes that aren’t backwards compatible
    • Quirks-mode available
  • No Commanding support
  • Isolated Storage performance problems fixed

 

 


Microsoft MIX 09 Keynote

March 18, 2009 10:25 by docbliny

Here’s a quick rundown of the items covered during the initial Mix09 keynote. View keynote.

 

General

SuperPreview

Beta available today.

Allows you to compare the rendering of a web page in different browsers. Supports both local installations of browsers and a cloud-based service to render in other browsers.

Read more on the Expression Blog.

ASP.NET MVC 1.0

Shipping today.

http://www.asp.net/mvc/

http://www.codeplex.com/aspnet

ASP.NET 4 and VS 2010

Even better IDE for C#/VB and web developers.

Web Platform Installer

http://www.microsoft.com/web/

Version 2.0 beta available today. Now allows web applications to be installed along with any dependencies.

Azure

  • FastCGI/PHP and .NET full trust
  • SQL Data Services
  • .NET Services

Commercial release this year.

Silverlight 3

Two surprises from left-field: Out of Browser and Multitouch support!

Current Numbers

  • 350+ million installations
  • 300,000 Developers & Designers
  • 200+ partners worldwide
  • 200+ Microsoft Products and Websites
  • 10,000’s of apps globally

Silverlight 3 Media Enhancement

  • GPU hardware acceleration
  • New codec support (H.264, AAC, MPEG-4)
  • Raw bitstream Audio/Video API, use .NET to access stream data
  • Improved logging for media analytics

IIS Media Services

  • Free for IIS
  • On-demand smooth streaming
  • Live smooth streaming
  • Edge caching
  • Web playlists
  • Bit-rate throttling
  • Advanced logging

Silverlight 3 Graphics

  • GPU acceleration and hardware compositing
  • Perspective 3D
  • Bitmap & pixel API
  • Pixel shader effects
  • Deep Zoom improvements

Application Development

  • Deep linking, navigation and SEO
  • Improved text quality (ClearType)
  • Multi-touch support
  • 100+ controls available
  • Library caching support (finally! Like a Global Assembly Cache for Silverlight)
  • Eclipse Support for Silverlight (on the Mac)

Silverlight 3 Data

  • Data-binding improvements
  • Validation error templates
  • Server data push improvements
  • Binary XML networking support
  • Multi-Tier REST data support

Out of Browser

Run Silverlight applications on the desktop for both Windows and Mac.

  • Extend media experiences
  • Companion applications for your website
  • Lightweight data snacking applications
  • Simple consumer friendly experience
  • Safe, secure, sandboxed environment
  • Built-in auto-update support
  • Build offline-aware applications
  • Integrate with underlying operating systems

Download Size

Total size: ~4.4MB. 40k smaller than Silverlight 2!

  • Thousands of new APIs
  • Hundreds of new features
  • New codecs
  • Out of browser support

SHIP DATE

  • Single beta planned
  • Ship later this year
  • Silverlight 3 Beta
  • Expression Blend 3 Preview
  • Silverlight 3 Tools for Visual Studio 2008
  • IIS Media Services

Expression Blend 3

Be sure to watch the keynote by Bill Buxton. Great energy and view on design.

View keynote

View Interview

http://www.billbuxton.com/

  • SketchFlow
    • Flow diagram for different parts of an application.
    • Wiggly” controls. Working controls that look like conceptual prototypes.
    • Free viewer application to view “sketches”.
    • Supports multiple options.
    • Supports displaying transitions with animations.
    • Supports giving feedback. Notes and drawing on the sketches directly. Send to Blend and view in context.
    • Export to Word to auto-generate documents for clients.
  • Adobe Photoshop and Illustrator import
  • Behaviors
  • Designing with data
  • Source code controls
  • XAML, C# and VB code Intellisense

Source code for DvrConvert posted

March 8, 2009 10:29 by docbliny

I just added the source code that Drew requested to the Downloads page.


Getting the WCF REST Starter Kit VS 2008 Templates Installed

March 1, 2009 18:28 by docbliny

I was playing around with the WCF REST Starter Kit CodePlex Preview 1 package and had some problems getting the Visual Studio 2008 templates installed correctly. Someone suggested running MSIEXEC with elevated permissions, but in the end I did the following:

  1. Run the setup, let the add-in installer crash closing any debug requests and such.
  2. Open the installation directory, such as C:\Program Files (x86)\WCF REST Starter Kit\Visual Studio Templates Installer.
  3. Double-click on RESTStarterKit.vsi and follow the instructions.

I still haven’t got the item templates to show up as expected. I noticed they got installed under Documents\Visual Studio 2008\Templates\ItemTemplates\Visual Web Developer instead of Visual C#, but moving them didn’t fix the issue.


New tool: On The Fly

February 23, 2009 19:45 by docbliny

I’ve added a new tool to the downloads page called On The Fly .NET. It’s a simple utility that lets you type in C# or VB.NET and run it. I use it mainly to test little snippets of code and for writing samples when I want to make sure they actually compile (and possibly run). It has basic syntax highlighting and code completion so it makes it easier to test things or check the name of a property/method.

OnTheFly

I haven’t done any thorough testing, but you’ll need at least .NET 2 and might need 3 since it currently imports some of the base WPF classes.

To output a result, you can simply use Console.Write()/WriteLine() and the content will be displayed in a separate window. It’ll remember some basic settings such as the code you last typed. You’ll need the Main function to exist as that will be the starting point of the dynamically compiled application, but you can always get the default template in the correct language which contains the required stub code by clicking New….


Yahoo! Silverlight 2.0 Developer Center now live

February 17, 2009 17:49 by docbliny

I finally found some time at work to update the Silverlight Developer Center on the Yahoo! Developer Network and it was just pushed live. It’s always great to get stuff out the door.

Check it out at: http://developer.yahoo.com/dotnet/silverlight/

Read the official announcement.


Converting D-Link D-ViewCam .DVF files to .AVI

February 14, 2009 14:10 by docbliny

I ordered another HDHomeRun Thursday and was expecting it to arrive Friday. Well, after having some friends over for dinner I got around to checking the UPS order tracking and it stated “Delivered – Front door”. Well, I certainly couldn’t find it. So I started D-ViewCam to check the security footage from our front door and guess what? No UPS guy had ever walked past our front door Friday.

The software that comes with certain D-Link web cameras is pretty awful. It also creates proprietary files (MJPEG/MPEG4?) along with additional information such as motion detection details. This was the first time I wanted to actually get the video out in a format that I could actually forward on if needed which I didn’t end up needing. Amazon had placed a replacement order with free next day shipping about two hours after I emailed customer support. Of course, this didn't really help on a Friday (OK, OK… Saturday) past midnight.

Turns out that D-ViewCam doesn’t work all that well on a Windows Home Server, at least through Remote Desktop. I was able to set the start and end cue points only once for an export. Other times they were disabled making it impossible to actually export anything. And the one time I was able to export, I ended up with a zero length file.

Long story short (I’ll leave out having to install VS2008 in a virtual machine since D-ViewCam doesn’t work under 64-bit Vista either), a few hours later I had a custom utility that will take a .DVF file and convert it into an .AVI. Unfortunately, I have to use the libraries from D-ViewCam to do this, which means you’ll need to have that installed. In addition, the format (compression) doesn’t seem to work (It doesn’t have any effect. The same goes for exporting via D-ViewCam).

The story also has a happy ending, the person who received the package a few streets down was kind enough to bring it over this morning, so now I have 4 tuners in Vista MCE, but getting that to work is another post altogether.

Dvr Convert Screenshot

The utility is a quick hack. It will only convert the whole file, and this will take several hours. It doesn’t do batches, and you can’t cancel it (unless you kill the app with Task Manager). I didn’t want to spend the time writing these unless someone actually asks for these features.

It’s available on the downloads page. Just extract and run DvrConvert.exe. Let me know if you want the source.

I’ve only tested with D-ViewCam 2.03 (available here) which is listed to work with the following cameras:

DCS-900
DCS-900W
DCS-G900
DCS-910
DCS-920
DCS-950
DCS-950G
DCS-1110
DCS-2000
DCS-2100
DCS-2100+
DCS-2100G
DCS-2120
DCS-3110
DCS-3220
DCS-3220G
DCS-3410
DCS-3415
DCS-3420
DCS-5220
DCS-5300
DCS-5300G
DCS-5300W
DCS-5610
DCS-6620
DCS-6620G
DCS-6110