Navigation

Search

Categories

On this page

Making Microsoft AJAX 1.0 Redistributable with Visual Studio 2005 Setup Projects
Microsoft Ajax 1.0 Extensions: Converting Existing ASP.NET Application Into AJAX-Enabled One
Microsoft "Acropolis" six years too late. I liked CCmdTarget of MFC back in nineties.
XBOX 360 Core as a Media Center Extender to Microsoft Vista MCE: Noise and Networking.
Making Bootable CD to Flash BIOS Without Floppy Drive
Notes on Upgrading Windows XP MCE 2005/IIS5 to Vista/IIS7
Dealing with "Support Code 85010014" issue while synchronizing Cingular 3125 WM5 Smartphone with Outlook 2007 running on Vista
Creating Web-Based MP3 Player using ASP.NET 2.0, UltiDev Cassini Web Server and Macromedia Flash Player
Problem with Macromedia (Adobe) Flash Object on the ASP.NET Page Served by Visual Studio 2005 WebDev.WebServer2.exe

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 53
This Year: 20
This Month: 2
This Week: 0
Comments: 8

Sign In
Pick a theme:

 Saturday, June 30, 2007
Saturday, June 30, 2007 5:53:12 PM (Eastern Standard Time, UTC-05:00) (  |  )

MS AJAX is great, but if you wanted to make an installable application with it, there was no way of including AJAX into your MSI-based setup project. I made a Visual Studio manifest that makes MS AJAX Extensions a Visual Studio Setup Project prerequisite:

Comments [0] | | # 
 Friday, June 22, 2007
Friday, June 22, 2007 12:01:40 PM (Eastern Standard Time, UTC-05:00) (  |  |  )

To AJAX-enable your existing ASP.NET 2.0 application follow this video. It takes only a few minutes and essentially makes you create a dummy new Ajax-enabled ASP.NET application and then copy & paste relevant pieces of its web.config file into your application's web.config.

If you are planning to use Ajax Control Toolkit, then instead of creating dummy project from the "ASP.NET AJAX-Enabled Web Site" Visual Studio project template, create the dummy project using "AJAX Control Toolkit Web Site" template. Its web.config has additional entry in the <controls> section of the web.config that will be necessary for your application.

Comments [0] | | # 
 Tuesday, June 19, 2007
Tuesday, June 19, 2007 9:42:13 AM (Eastern Standard Time, UTC-05:00) (  |  |  |  )

Microsoft is showing off its new Acropolis framework for .NET. It seems to be a little more than good old CCmdTarget of late MFC. 

Back in 2001 when I was making a transition from C++/MFC to C#/.NET two things I missed the most were C++ templates and CCmdTarget/Doc/View architecture of MFC-based Windows UI. I could not believe Microsoft didn't port CCmdTarget at the time and naturally wrote my own. But pretty soon it was obvious that with C# and Visual Studio .NET writing ASP.NET web applications was easier than making Windows UI apps, and people wanted web UI more than windows UI.

Combine dwindling demand for Windows UI with inferior development tools and you end up in the situation where software architects don't even debate whether their next enterprise application should have Windows UI or web UI. It's assumed and understood that it will be a web-based application. If you think an application needs to have Windows UI - you will face an uphill battle convincing other project stakeholders it's the right way to go.

Simply put, Windows UI is so out, and web UI is so in that incremental improvements in Windows UI world like WPF and Acropolis is too little and way too late to save the day. We've got AJAX, thank you very much. In my arrogant opinion enterprise apps will not go back into Windows UI world. The last bastion of Windows UI applications is SOHO market, but that is about to change with HttpVPN making it possible to make easily redistributable web applications for consumers and small businesses. Once that happens, Windows UI will become just gaming and other graphics-heavy applications platform.

Comments [0] | | # 
 Sunday, June 03, 2007
Sunday, June 03, 2007 11:54:54 AM (Eastern Standard Time, UTC-05:00) (  |  |  )

Until recently I've been running MCE 2005 on Windows XP with Linksys Media Center Extender (MCX) connected to the XP box over 802.11a wireless network. That was a nice and stable setup, but with the technology moving forward it was time for an upgrade. I have successfully upgraded XP to Vista, and since Vista did not support "old" Media Center Extenders like the one I have, I had to get XBOX 360 - the only game in town when it comes to extenders supporting Windows Vista.

Cursory Google search revealed that even most basic and least expensive XBOX 360 version, the Core System, can run the extender application just fine by loading the MCX software from the Vista box over the network. Far more serious issue for me was how loud XBOX 360 is. The thing is that Media Center Extender box is located in the bedroom, and any fan noise from XBOX 360 would be very annoying. Linksys Media Center Extender was not just quiet - it was completely silent. It has no fans or motors at all. The price for the silence was that its CPU was underpowered and therefore it was mostly nothing but a dumb Remote Desktop terminal displaying the UI rendered on the XP box, with the exception of rendering the streaming media on the MCX box itself. XBOX 360 has a very powerful multi-core processor and therefore is easily fit to render all the fancy MCX UI right there, which makes UI of MCX running on XBOX 360 much more responsive compared the Linksys. The price of the performance, besides $300, is the fan and its noise. How much noise exactly? The whole reason I write this post is because after searching the "Internets" I was unable to tell whether the level of noise is acceptable or not. Some people complained that it's horrible, and some said it's OK. Well, here's the verdict: yes, the noise is bad and I can't believe Microsoft didn't find a solution to the noise problem, BUT the remedy is you can turn XBOX 360 completely off when you are not watching it! Noise level when you use the XBOX is not uncomfortable at all. The drawback is that it takes XBOX about 50 seconds to boot, load MCX application from the server, and launch the MCX UI when you turn the XBOX on (which BTW can all be done at once by pressing Mediacenter Green Button on the mediacenter remote). I don't mind paying the 50 second price for the complete silence of the turned off XBOX, while being able to enjoy fast and responsive UI of the XBOX setup.

Another quick note on the subject - the networking of the new extender. Linksys extender had both wireless and wired networking capabilities. I ran it over 802.11a (Wireless-A) network that is fast enough for streaming recoded TV and at the same time is not susceptible to interference from all the 2.4GHz devices like cordless phones and 802.11g (Wireless-G) networks of your neighbors. XBOX 360, however, has only wired networking capabilities, and since our house is not wired for Ethernet, I had to use ZyXel power line Ethernet adapter. I really like ZyXel power line adapters - they are great alternative to wiring your house or using wireless networks. When I was setting up extender piece on the Vista machine, MCE tested the network bandwidth and found the throughput not sufficient for streaming TV. I though it's strange because ZyXel PLA-100 adapter is supposed to be 85 marketing Mbit (about 45 real Mbit) - quite faster than 22 Mbit of the Wireless-A network that was working just fine. Sure enough, TV and video streaming ran absolutely smoothly over ZyXel PLA-100. However, whenever we get an HDTV set connected to the extender, we'll need to upgrade ZyXel adapters to speedier 200 marketing Mbit (hopefully about 100 real Mbit) PLA-400.

[June 12 UPDATE: The same day when I wrote this post I noticed that network performance of the setup has degraded to the point of recorded TV being unwatchable: picture would freeze or won't start playing back at all with the black screen, with "Network Issues" pop-up ever-present on the screen. I thought the problem is ZyXel PL-100. I replaced it with Viewsonic 802.11g access point connected to XBOX 360, and just like with PL-100 it worked flawlessly the first time I turned on the XBOX, but went down exactly the same way as the the power line adapter based network. Funny thing is that if I hit Fast Forward button on the MCE remote, FF works and produces absolutely smooth video! So at normal rate it crawls to the stop, but with fast forwarding there are no "Network Issues"? I was able to playback the same recorded shows over the same network connections using notebook and WIndows Media Player with no problems. I think Microsoft has a whole lot of explaining to do about its XBOX 360 "networking issues".

Comments [0] | | # 
 Saturday, June 02, 2007
Saturday, June 02, 2007 12:17:27 AM (Eastern Standard Time, UTC-05:00) (  |  )

If you are upgrading your Windows XP system to Vista chances are you will need to upgrade your system's BIOS to support Vista. Flash utility for my MSI motherboard BIOS can't run from Windows (how nice on MSI part), and as lots of users nowadays my system does not have a floppy drive to boot DOS from. Making a bootable CD with just a basic set of drivers to allow enough memory for Flash utility turned out to be a very frustrating endeavor. There are lots of bootable CD images out there, but the most common problem with images is that they load bunch of drivers that take up a lot of memory and hang often. To flash a BIOS all you need from DOS is CD support. I spare you details of all the options and approaches I tried and get right to what you need to do to make a bootable CD and add your flash utility and BIOS file to it.

  1. Download and save Windows ME bootable ISO image. Get WinME_bootdisk.iso file. Don't worry - it's not an entire Windows ME; it's just a 3MB DOS portion of it.
  2. Download and install Magic ISO Maker, a small utility capable of modifying an existing ISO image.
  3. Run Magic ISO Maker, open WinME_bootdisk.iso, add your Flash files, and save the WinME_bootdisk.iso file.
  4. Burn WinME_bootdisk.iso to a CD.
  5. Boot from the CD and in the boot menu select an option with a CD support. This option should leave enough "conventional" memory after loading DOS and drivers for the Flash utility to run. 
  6. Your CD drive is likely to get letter "D:". Switch to CD drive by issuing D: command and run your Flash utility.

 

Comments [1] | | # 
 Wednesday, May 23, 2007
Wednesday, May 23, 2007 3:20:28 PM (Eastern Standard Time, UTC-05:00) (  |  |  |  )

Although usually I prefer to make a clean installation of a new OS to lose all the junk accumulated since last OS upgrade, this time I decided to upgrade our family Media Center box instead, because unlike my desktop the MCE box has just a few basic server apps, like IIS, email server, ORB, WebGuide, and of course MCE 2005.

Overall, upgrade was a success, but most of the drivers and applications had to be either upgraded or reinstalled. There were quite a few things to take care of:

  • Running Vista Upgrade Advisor was a good idea. It tells upfront which drivers, services and application will not, or may not work. The most important thing it told me was that I don't have enough space on drive C:, so since it was still an XP I used Norton Partition Magic to increased the C: partition size by 25 GB. I also downloaded some Vista drivers before starting the upgrade just in case my network card would not work after the upgrade.

  • Although ATI Catalyst software was not among those Vista Upgrade Advisor suggested to remove, the screen resolution settings were not preserved by the upgrade process. Moreover, standard MS ATI driver didn't support resolutions required by some HDTV sets. I had to visit ATI web site and download the latest driver and the Catalyst software. Once I've done that I was able to adjust the resolution back to what it used to be.

  • MCE settings partially survived. Scheduled series settings carried over fine, but Signal settings and Guide had to be specified again by going through the setup wizard. I had my recorded TV shows location in XP MCE changed from the default. While new MCE in Vista has found them, I still had to specified the location for new recordings. Thankfully, it was easy - the UI allowing to change the location of newly recorded shows is built into Vista's MCE app. Pictures and Music location settings have carried over with no problem.

  • The hardest part was to revive ASP.NET applications and sites after IIS was upgraded from IIS5 on XP to IIS 7.0 on Vista. The hardest problem was that caused by the remnants of some old version of .NET Framework 2.0. That caused application pools hosting .NET 2.0 to crash hard on the very first request while spitting out strange errors, like "The worker process failed to pre-load .Net Runtime version v2.0." to the application log. It took me two days of Internet searching to find the solution.

    ASP.NET 1.1 applications were also all not working. I had to run aspnet_regiis.exe from the 1.1 Framework to bring them back to life.

    In many cases I had to manually ACL folders containing ASP.NET applications with access rights for "NETWORK SERVICE" user account. I also had to change anonymous authentication account from IUSR_whatever to appPool identity.

    The bottom line is migration of ASP.NET web apps was not trivial.

  • Both Orb and WebGuide stopped working after the upgrade. I upgraded ORB with no problem and uninstalled the WebGuide so I could install Vista-specific version of the WG. It all went fine - that's after I was done fixing all the IIS7 glitches.

  • dasBlog 1.9 - the software running this blog - ended up being incompatible with Vista. I had to move this blog to another server running good ole' Windows 2003/IIS 6.0. After moving the app to another server, which was free of surprises, the final challenge was to redirect links going to old blog location pointing to IIS7/Vista to the new one. Unlike IIS6, IIS7 does not have a UI where you could choose "A redirection to a URL" as a destination for your virtual directory. Redirection in IIS7 can be done but it requires running a command-line utility. Fortunately that worked.

  • Unlike IIS, UltiDev Cassini Web Server underpinning WebGuide4 went through upgrade precess as smooth as it can be.

 

Comments [1] | | # 
 Sunday, April 08, 2007
Sunday, April 08, 2007 2:49:53 PM (Eastern Standard Time, UTC-05:00) (  |  )

My Windows Mobile 5 based Cingular 3125 cellphone stopped syncing with Vista desktop quite some time ago. Synchronization error stated "ActiveSync encountered a problem on the desktop", which is weird since Vista has replaced ActiveSync with Sync Center and Windows Mobile Device Center (WMDC). Checking error log on the device yielded reference to "Support Code 0x85010014", but no information on how to contact support. 

Quick brute force "google & fix" approach didn't work, so it was until now that I found time to find the solution. As many articles on Internet point out, Support Code 0x85010014 problem is related to syncing with Microsoft Office Outlook. In my case it was Outlook 2007 running on Windows Vista Ultimate Edition.

Despite legions of people experiencing this problem, it was surprisingly hard to find the workaround. The fix (first mentioned here) turned out to be simple: repair Microsoft Office installation by going to Control Panel -> Programs And Feature, selecting Microsoft Office 2007 and then clicking Change button on the toolbar.

Comments [0] | | # 
 Monday, March 05, 2007
Monday, March 05, 2007 6:30:06 PM (Eastern Standard Time, UTC-05:00) (  |  |  |  )
Summary

UPDATE: This sample is an open-source project now.

This article describes how to build a redistributable ASP.NET application that allows users browse remote server's file system and pick folders with MP3 files to be played by embedded Macromedia Flash-based MP3 player.


Article Sources

Download article's C# source in a form of Visual Studio 2005 Solution comprising ASP.NET application and a Setup Project. Unzip the archive to "C:\".


End Result

UltiDevMP3Player-2-Thumbnail.PNG  

After building the project you will have an MSI-based setup package that can be installed on virtually any Windows-based PC. Installed application will be accessible from inside the LAN as an intranet application without having to install IIS.


Prerequisites

- Visual Studio 2005.
- UltiDev Cassini Web Server for ASP.NET 2.0. UltiDev Cassini is packaged together with the application into the Setup.exe so that the final application would not depend on IIS being present on target system.


Let's Begin (Getting Ducks in a Row)

A few weeks ago I stumbled upon a great piece of free software:Flash-based XSPF-compatible MP3 player. When embedded on a page, it can take playlist over HTTP and play it. Second nice thing was that XSPF play list format has XSD schema available. .NET Framework xsd.exe utility allows easy conversion of XSD schemas into C# or VB.NET classes incapsulating the structure of the data defined by the XSD, as well as implementing XML serialization to and from XML files conforming to the schema. So I had an XSPF-compatible MP3 player and a free code generating XSPF-compatible XML. That meant I could easily create XSPF-compatible playlists on a fly. Only if I had free ID3 tag (MP3 file metadata) access API...

Finding ID3v2 library for .NET was harder than I expected. However search was ultimately successful. The UltraID3Lib ended up being just what I needed. It's a nice library; may be just be a bit over the top object-oriented.

Final piece is UltiDev Cassini Web Server for ASP.NET 2.0. It's necessary because first, it can be packaged and shipped along with any ASP.NET application eliminating requirement for IIS. Second, unlike IIS UltiDev Cassini service works under "Local System" account, which enables access to any local file and folder on the server. One thing to note, while this is quite convenient to have a web server running under powerful account, it may pose a risk if the application is exposed on the web. It's best to work with the application inside protected local area network.

After you have downloaded the solution, unzip it on C:\. It will create "C:\UltiDevMusicPlayerSample" folder. If you want to put it in some other folder - you can do that too - simply adjust your project debugging settings later to point to the correct application folder (see below).


Application Flow

- Application has a single page (Default.aspx) containing the player control and file a system browser (Controls/PlayerControl.ascx and Controls/PlayerControl.ascx.cs).
- After user selected a folder with MP3 files, file system browser tree gets hidden and player control is re-rendered to point to the dynamically-generated playlist representing selected folder.
- Player control requests dynamic playlist and custom IHttpHandler (AppCode/PlaylistClass.cs and AppCode/xspf.cs) serves XSPF-encoded playlist containing songs in the selected folder. Playlist contains song information retrieved from songs' ID3v2 and ID3v1 MP3 tags.
- Player plays songs one by one: requesting each one from the custom IHttpHandler (Handlers/Song.ashx) serving songs from local file system. After song started playing player also requests song album artwork (cover art) from custom IHttpHandler (Handlers/CoverArt.ashx) which serves image extracted from song's ID3v2 tag.

Debugging

I had troubles getting Visual Studio 2005 internal web server to serve Flash component. I switched to UltiDev Cassini for debugging and that has solved the problem. Debugging with UltiDev Cassini is probably a good idea anyway since the application is eventually going to run under UltiDev Cassini.

To switch to UltiDev Cassini, bring up ASP.NET application's properties, select Start Options of the left, and check "Start External Program" radio-button. Enter "C:\Program Files\UltiDev\Cassini Web Server for ASP.NET 2.0\UltiDevCassinWebServer2.exe" as the program to be used for debugging, and specify "/run c:\UltiDevMusicPlayerSample\WebApp Default.aspx 4125" (no quotes) as command line arguments. If you have unzipped solution to a folder other than "C:\", then you will need to modify c:\UltiDevMusicPlayerSample\WebApp part of the command line arguments to point to the actual application location.
VS2005DebugSettingsForMP3App.PNG


Setup Project

Unlike regular ASP.NET application, this application is using regular (non-web) setup project for installer implementation. The reason for that is the Visual Studio web setup project is actually IIS setup project. Since we are using UltiDev Cassini instead of IIS, regular setup project is required instead.

Setup project packs UltiDev Cassini into Setup.exe bootstrapper and ensures application is registered with UltiDev Cassini during installation process and gets unregistered during uninstallation.

Creating a setup project for ASP.NET application bundled with UltiDev Cassini is not complex, but if you need step-by-step guide, please refer to this walk-through.

IMPORTANT: When installing the application, don't just click the .MSI file. You will need to run Setup.exe to ensure UltiDev Cassini web server gets installed on target system. This is especially true on Vista, where clicking .MSI and running Setup.exe are not nearly as functionally close as it used to be on Windows XP.

Build & Enjoy!

Comments [0] | | # 
Monday, March 05, 2007 4:22:37 PM (Eastern Standard Time, UTC-05:00) (  |  |  |  |  )

Recently I've been working on the small ASP.NET 2.0 app that has a page containing Macromedia (now Adobe) Flash object. When I tried debugging it with Visual Studio 2005 and its internal web server, the Flash piece has never been loaded by Internet Explorer - I am not even sure whether it was the Flash player that failed to load or the .SWF file. I wonder if anyone else had this issue. I could not check which component was not loaded because WebDev.WebServer2.exe serves only local applications, and I could not use an http tracer to see which request gets stuck.

I worked around the issue by switching to our own UltiDev Cassini for ASP.NET 2.0 for application debugging. It served all the bits and pieces required by Flash without a hitch.

Comments [0] | | #