Posts

Showing posts from 2010

Megaforce

Oh the humanity...

My Least-Loved Christmas Songs

I really enjoy Christmas music -- especially the more traditional, Johnny Mathis/Andy Williams type stuff -- but there are certain Christmas songs that I just can't stand. For starters, it seems like I don't like anything modern, specifically new takes on old classics. Mariah Carey is very talented, but for some reason I can't explain, I don't like her versions of any of the old Christmas songs. Same goes for any of the other current mega-singers. Again, I'm not sure why -- I have nothing against them, I just don't like their renditions of those songs. Then there's some old classics that I could never stand. For example, "All I Want For Christmas Is My Two Front Teeth". Personally, all I want for Christmas is for him to stop singing. Then there's a handful of songs that I used to hear, over and over, on any given Christmas at my aunt's house -- she'd always have the radio on and I guess the station only had a limited number of Christmas...

Red Shirts

Image
A funny comic from yesterday's paper.

How to Resolve Background Noise and Low Output Volume with the M-Audio Fast Track USB with Pro Tools

I recently purchased the M-Audio Fast Track USB recording interface with Pro Tools so I could begin recording some of the music I've been writing ever since picking the guitar back up a few years ago. I was excited to have something I could plug into my laptop or desktop, record music played on guitar or bass, and add drum tracks using a MIDI sequencer. However, when I hooked the equipment up, all did not go as planned. I eventually solved the problems and am ready to start recording as soon as I have some time. The first problem I had was a horrific amount of background noise. I had plugged guitar directly into the specified input on the M-Audio box, with the M-Audio box plugged into the USB port on my laptop. I had the correct line selected on the box (using the Line vs Mic input button), but the background noise overwhelmed everything else. Doing a little research on the web, I found that if I unplugged the laptop and let it run on battery power, the noise went away. Some peopl...

Video Game Review: Your Shape Fitness Evolved for Xbox 360 Kinect

Image
I recently picked up Your Shape Fitness Evolved for Kinect on Xbox 360. There aren't currently a lot of Kinect titles, but this one is one of the best I've tried. Having used Wii Fit, Wii Fit plus, and EA Active for Wii, I can safely say this game gives me a better workout than any of them, though it isn't perfect. The game offers 3 different types of workouts: a personal trainer guided workout (of which there are several regimens to choose from), fitness games (for example, Virtual Smash, which has you punching blocks that appear in front of you), and Zen workouts (Tai Chi). After messing around a bit with the games and zen stuff, I decided to get down to it with the personal trainer workouts. I thought I was in pretty good shape. Well, at least not bad shape. I'm relatively active, and do a lot of walking, including a daily lunchtime walk that lasts about half an hour which I've been doing for almost 10 years. So I was surprised when Your Shape decided to destro...

My Recent Experience with Comcast

I recently subscribed to cable television and internet service with Comcast. I don't watch a lot of TV, so haven't had cable TV in years, but with the transition to digital TV from analog, and the poor reception I get over the air, I decided it was time to get cable again. Another reason for my subscription was due to my absolute loathing of Verizon. I've had DSL with them for years, and phone service with them since 1998. The phone line has never worked well, and every time I'd call, Verizon would blame it on wiring inside the house. Whenever it would rain heavily, the phone would go out altogether, which didn't sound like an in-the-house issue to me. After the last time a technician came out and found no problem, I traced the lines from the box and found that one of them was seriously frayed. I wish their professional technician would've noticed this. I ended up making the repair myself, and I'm not a professional phone technician. If it weren't for m...

How to Send Large Amounts of Data to a WCF Service

A project I was working on recently made use of several WCF services, but we were having trouble sending large amounts of data to them (specifically, large integer arrays). We spent days trying to figure out how to resolve the issue, trying every config param imaginable (maxRequestMessageSize, maxItemsInObjectGraph, etc), but to no avail. Finally, at the 11th hour, one of the developers found the problem: IIS 7 was interpreting this large message as a Denial of Service attack and returning a false error message. The solution was to add the following to the web.config files of the affected services: < system.webServer > < security > < requestFiltering > < requestLimits maxAllowedContentLength = " 2147483647 " /> </ requestFiltering > </ security > </ system.webServer > Note that the value being used in the maxAllowedContentLength attribute is the maximum integer value and was used only for testing. In ...

Export and Import Server Package Options Not Appearing In IIS After Installing The Web Deployment Tool

I spent some time today learning about the Web Deployment Tool in Visual Studio 2010 and IIS, but despite having the tool installed wasn't getting the options to export or import packages in IIS. Finally, after much web-surfing, I stumbled across this excellent post which held the answer: if you install the tool via the Web Platform Installer, it doesn't install everything. The solution: either install it from the msi package to start, or, if you already have it installed, go into Programs and Features , right-click Web Deployment Tool , and select Change . Then, install the additional components you need (in my case, I selected everything that was not already installed). Alternatively, you could download the msi, run it, and select Change from the dialog when prompted; then choose any or all additional components. Many thanks to the author of the aforementioned blog post!

Automatic Virutal Directory Creation Failing in VS2010

One of the projects I work on involves a WCF service that is set up to run under IIS instead of the Visual Studio Development Server. This project has a couple of branches that from time to time are merged back into the trunk, which sometimes leads to the following error if the developer is prompted by Visual Studio to automatically create the virtual directory for the service to run under: Creation of the virtual directory (URL) failed with the error: The URL '(URL)' is already mapped to a different folder location. The reason this error occurs is because, based on which branch was being used when the file was committed to source control, the directory could be different. I figured this would be a pretty easy thing to fix -- just delete the virtual directory in question. But I was surprised to go into IIS Manager and find that...it wasn't there. Yet I could go to the URL in question and receive an error page that suggested that the URL was, in fact, valid. The fix was some...

The "Not a valid AllXsd value" Error Message

I was recently testing a web service method using SOAP UI and received the following error in regard to one of the method's parameters, which happened to be a date/time value: "The string '2010-09-23 10:00:00 AM' is not a valid AllXsd value." The solution was to format the value in YYYY-MM-DDThh:min:seconds.milliseconds format. For example: 2010-09-23T10:00:00.0000 Use leading zeroes for 1-digit hours. Example: 2010-09-23T09:00:00.0000 In my environment, the milliseconds were optional.

Error Running a WCF Service Under IIS in Visual Studio 2010 and Windows 7

I was recently working on a WCF project in VS2010. Originally, the service was configured to run under the development server, but was later reconfigured to run under IIS -- but once this happened, it would fail when I'd try to start it up for debugging in the IDE, giving me the following error: The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map. To correct this issue, follow these steps (these steps apply to Windows 7 and may differ slightly depending on which version of Windows you're using): 1. Go to Control Panel 2. Select Add/Remove Programs 3. Select Turn Windows features on or off (from the left pane if you're using the modern view) 4. Go to Microsoft .NET Framework 3.5.1 (or something similar -- may very depending on your system). Expand this node and make sure the check boxes for any WCF options are checked. Then click OK. But wait, there...

History Detectives

I don't watch much TV, but one of the few shows I do watch is History Detectives on PBS. Each episode features three investigations, each one centering on the history of a specific item and its historical significance. For example, someone may have a family heirloom that they believe may have belonged to George Washington. The person contacts the History Detectives and one of them travels to the person's home, listens to the information the person has about the item, and then, in most cases, takes the item with them as they travel around the country to fill in the missing blanks in the item's history and find the answers to the questions the owner has about it. Watching the show, I have to wonder if anything bad has ever happened to one of the items being investigated. Have any of the History Detectives accidentally damaged (or utterly destroyed ) one of the items when taking it with them to investigate? I can only imagine how that would go over. It'd be like "So...

Clearly Defined

I was talking with a friend today, an older friend who is cantankerous, funny, and often sarcastically insightful. We have some things in common, such as our choice of careers, and we both play guitar, so I enjoy talking with him quite a bit. Today, the topic of some old movies came up. I can't remember how. One of the movies he mentioned was The Great Race by Blake Edwards, and starring Tony Curtis and Jack Lemmon. I've never seen it, but my friend was telling me about how the hero and villain were so clearly defined in the film, with the hero dressed impeccably in a white suit, and the villain in black with a wiry moustache and top hat. The way he described it, it seemed cliche, which was part of the appeal. And it made me think of my own life lately, and how I wished for things to be that well defined, to have that same contrast. There is no black and white in my life. At least, not lately, not recently. There are various shades of gray, with the circumstances, people, and ...

"$.ajax is not a function" Error When Using jQuery and Darren Johnstone's ASP.NET Upload/Download Module v2

Lately I've been working with an excellent file upload library for ASP.NET written by a guy named Darren Johnstone. This library allows you to upload files and see a modal dialog and progress bar which indicates the percentage of the file upload having been completed. It doesn't use Flash (or Silverlight for that matter), just good ol' server-side .NET and some AJAX on the client-side. However, it also killed some existing jQuery code I had in place to make some AJAX calls to WCF services. I found I was now getting the following script error: $.ajax is not a function My workaround was to change my jQuery code to not use the $ abbreviation. So, in other words, I changed $.ajax to jQuery.ajax -- then it started working again. I'm not sure what it is about the upload control that affected this, but the workaround is manageable. Now I'll just need to explain to everyone why my code uses the long version instead of the shorter one anytime someone says to me "Hey, ...

"Sequence contains more than one element" Error Using LINQ

I wrote some code today utilizing LINQ to retrieve values from an XML document, and received the following error: "Sequence contains more than one element" I was confused because the code I wrote was very similar to other code I've written, which works fine. Turns out the error was caused because the results of my LINQ query contained more than one object, and I was using the SingleOrDefault() method -- I wanted to retrieve only the first matching object of the results. However, what I should have been doing was using the FirstOrDefault() method. The "Sequence contains more than one element" error occurs when you use SingleOrDefault() and your results contain more than one element. In situations like this, use FirstOrDefault() instead.

How to Get the Physical Path of an ASP.NET Application

This is one of those things I do infrequently enough that every time I need to, I ask myself "Now how do I do that again?". So I'm posting this here not only to help anyone else who needs to do this, but also to be able to easily remind myself how next time I need to. To get the physical path of an ASP.NET application, you can use: HttpContext.Current.Request.PhysicalApplicationPath