Archive

Posts Tagged ‘Horror Stories’

Entity + GAC’d Assembly == Hell?!

June 17th, 2009 Rev No comments

Okay, so I’m trying to have the .NET conversion of the site at work use Entity for our Data Access Layer. Seems reasonable. I also figure I’ll represent the different silo’s of data (accounts, catalog, etc) into their own Entity Contexts and in their own Assemblies… all under a namespace.. like DAL.Accounts or DAL.Catalogues. So far so good.

Now my thinking goes that I’ll want these accessible by any of the web applications we’ll be creating for the site. And I’ll only want to maintain one copy of the files rather than spread across all the web apps. So clearly I should put the assemblies in the GAC.

First issue comes up is that the default connection string is stored in the app.config file. This isn’t put in the GAC. So, no default connection string. Hrmmm okay…

Well, if I put the appropriate connection string in the web.config of the web app this should suffice. Hrmm stretching a bit.. but okay. Ooop, nope. Not working. Well, perhaps I need to be specific about the assembly name in the reference section of the connection string. Noooo… still hates me. In looking at the documentation is looks like (if I read it correctly) it’s going to search for the resources files in assemblies in every spot BUT the GAC!

Sure, sure… I can create a context and pass the connection string in by hand. okay.. that works. I even created an EntityFactory class in the assembly to pass back a new context… so I don’t have to worry about knowing the connection string. But, I’m faced with the fact that none of the data binding is working.

What am I, or Microsoft, doing wrong here? Clearly one of the two of us is at fault.

IE “Object doesn’t support this action”

March 9th, 2009 Rev 2 comments

I ran into this little bundle of awesome while trying to work with JSON and jQuery. In FireFox (as always) everything worked wonderfully. But as soon as I opened it up in IE it quickly turned into anything Microsoft is involved in, a huge cluster.

After hunting and hunting I found the issue with this bit of javascript:

for(item in ResultsArray.items){….

Turns out in IE ‘item’ is a reserved word. So watch out for that.

Ugg I hate IE. I hate how it makes me scream and complain.

Damn you MS!

Thanks for the pointer from Johannes Fahrenkrug’s site.

System.IndexOutOfRangeException: Index was outside the bounds of the array.

March 6th, 2009 Rev 1 comment

Okay, this one made me want to smash my head with a brick.  I’m working along on a web site using C# and ASP.NET 1.1 when I suddenly get this error.  I’m getting a DataTable from a DataSet so it makes sense.

I start by checking the query. Nope, still returns data just fine.  I test and make sure the DataSet isn’t null.  I make sure the table isn’t null.  Nothing seems to be wrong.  So I say, okay, fuck it and I choose a different way of getting my DataTable.  Then suddenly it’s saying assign “” to the value of a string is an array out of bounds exception.

By this time I’m losing my ever loving mind.  Finally I google it up and find that for what ever reason ASP.NET will flag the first line of a method for that exception even though it happens later in the method.

Completely blew my mind. I mean, I had other errors and exceptions come up that pointed to the right line of code.  But not that one.  VERY furstrating.

So, keep an eye out for that one.

Vista and Screen Refreshing at Unlock

March 24th, 2008 Rev 1 comment

If you’re like me and you have to use Vista (sorry) you might be running into an annoyance. If you’re running multiple monitors - might happen on singles, don’t know - when you wake the system up, unlock it, or just basically log in the screen(s) will tend to blank out and rebuild themselves. This has the annoying effect of (at least for me) shoving everything I had on my external monitor back onto the main monitor. This forces me to find all the windows I’d had on the other monitor and shuffle them back over.

After weeks of doing this I just gave up as it wasted lots of time and eventually I had a second monitor that was never used. Vista just oozes fail. Anywho. I tracked down the solution and here it is for your enjoyment.

Bring up the Task Scheduler (found under Administrative Tools). Go down the Task scheduler tree on the left to Task Scheduler -> TaskScheduler Library -> Microsoft -> Windows -> MobilePC. There you’ll find TMM. Go ahead and disable that. This supposedly allows windows to detect and configure newly added monitors on the fly. It frankly hasn’t worked properly for me in the past - I run an external as a main monitor on my setup and when I slept my laptop and took it home it still thought the main was there and so displayed the menu bar and all on some non-existent monitor. DOH!

Anywho, disable this task. And then remember to the Task Scheduler Summary (Task Scheduler in the tree on the left) and select “Display All Running Tasks”. Find TMM, it’ll be running, it was for me. And then stop it.

Since then I’ve had no problems with my screen cleaning up all my windows and sweeping them away. This is also supposed to keep you refresh rates and resolutions from being reset. Though I only had that happen once or twice.

Good luck with your further pains of working with Vista. And remember, you’re not alone. Though, in a perfect world…

Jailbreaking the iPhone 1.1.4: An Adventure

March 18th, 2008 Rev 2 comments

So you’ve decided that the iPhone SDK was either too little, too late or both. And so you’re going to jailbreak again. Perhaps you’ve downloaded iNdependence and you’re going to give it a whirl. Well, if you’re like me the app will crash the instant it goes into recovery mode and won’t start properly while it’s attached to the system. So enjoy that restore in iTunes.

While you’re waiting for the phone to finish restoring you might poke around at other options. Maybe you’ll take a friends advice and try iPlus. After googling and digging around looking for the actual files and not just blog posts about how teh awesome it is. You’ll eventually find this download page. And you’ll download the whole package and give it a shot now that your iPhone has finished restoring to 1.1.4 and synching all your stuff.

You might freak when it says it’s just going to go ahead and jailbreak AND unlock your phone. Whoa whoa whoa… you’re already paying AT&T and people who unlock often get screwed with firmware updates. So you go back to the site and find the download that says it’s for jailbreaking ONLY.

Unzipping and looking at the jailbreak only it doesn’t seem much different but you give it a shot. Seems to go well. But… then it sits saying you’ve successfully completed the jailbreak and it’s rebooting. Only, it’s not. Just spinning away. You look at the message on the iphone screen and it says it can’t find the reboot script. Because it’s in the payload that’s not in the jailbreak only bundle. Doh!

So you force a reboot of the phone and yup, no jailbreak. By now of course you’ve found the guide that takes you through the install and you note the point that at which is says

“If you only want to jailbreak your iPhone (you have an AT&T account set up as an iPhone and you don’t want to unlock your iPhone), type ./iplus -j instead.”

So you go back into the first iPlus package you downloaded and you run iPlus with the -j option. Woot! It works! Right on.

But wait. No YouTube. I know, I know. Who cares. Well… you do because you paid for this thing and you want to use it all and then some. So you have SSH on there and Terminal and being a security minded individual you make sure to hop right into the shell and run passwd and get that default password (alpine) changed and fast.

Then you set about getting a few good apps installed. One of which is a handy tweak you found that will fix the YouTube problem. You exit the installer and reboot. WHOA.. wait.. where did all the bookmarklets on the spring board go? Why is it telling me how to move and delete icons from the spring board? Why is it rebooting?! And again? And again?! And… (You get the picture).

Well, crap. Is it a brick? No. Digging around you find that if you connect the phone to the computer and then fire it up holding the power button and the home button (not just the home button like you found earlier) that it’ll go into recovery mode and you can begin the tedious process of restoring your iphone through iTunes. Phew, your ass unpuckers.

While you’re waiting for the restore you go over what you did wrong. Perhaps that “fix” for YouTube wasn’t such a good deal after all. You vow to skip that this next go around and after getting some coffee and going to the bathroom you come back to find the restore finished. You launch iPlus again and go to put the kids down.

Coming back you’re ready to go. Drop to shell, passwd away the security problem. And you set about checking that everything is working. Hrmm well no.. the browser crashes. What gives? Well, maybe you need to reboot to kinda flush things out. Oohh ooh! Yup.. you’re in that loop again. Well, crap.

While you sit and wait for the restore (how many has that been?) you’re online with your friend who is currently running Mono on HIS jailbroken phone. And he suggests maybe ZiPhone. Hrmm okay.. why not? It’s not like you’re the type to learn your lesson. You grab it while your phone is still restoring and get ready for some command line fun. But.. it’s an .app. Okay ready to go… iPhone is restored. You run the app. You click jailbreak. And like that you’re done.

But now YouTube works… everything seems to work. You go into the installer app. Start to set things up, apparently the BSD subsystem isn’t installed by default. As it installs it warns you NOT TO CHANGE THE PASSWORD WITH PASSWD, because it’s borked and it will make your iphone reboot over and over and over…. GAH! That would’ve been nice to know! Wish someone would’ve blogged that, eh?

So, now all is good with the world. You install your apps. Though VTerm won’t install. But you can just grab that here. And you find a site that explains how to change the password if you need to and suggests installing Services so you can turn off SSH to save battery life and keep from tempting folks when you’re not using it.

Phew… well, that’s over. Good job! Now let’s see about Mono.

iPhone camera stops saving photos - solution

March 15th, 2008 Rev No comments

If, like me, your iPhone camera suddenly stops saving the pictures it’s taking then you’ll be happy to hear I’ve done all the digging and found you the answer. Find it here on the Apple support forums.

The good and the bad

October 20th, 2006 Rev No comments

Well, I got a hold of UPS to see if I could just pick up the package on Saturday if it was just going to sit in a warehouse in town till Monday. I got some southern lady who sounded ticked off and she said “NO, you may not pick up your package it is scheduled for delivery on Monday. Have a good day.” Click.

Then I spent an hour and a half on hold with Overnight(not)Prints. Finally I got shipping and they said they couldn’t change the delivery date or location - not true… I checked UPSs site - but I let it go. They refunded the shipping. Which is good. It’s over half the cost.

When all was said and done the guy says “Sorry we were late by a DAY.” in a sort of “what ever” voice. I said “Okay, thanks.” because I was done and I was in the middle of finishing some code so I could go home. But that kind of annoyed me a few minutes later when it sunk in. “.. late by a DAY.” Normally I can be understanding about ship times - even though I hit refresh on the package tracking over and over. But when your business model is all about.. Hrmm what was it? “Overnight” You’d think that people might expect that. Plan on it even. Oh well.. now I need to let it go… I know..

The good news? I stopped by CJs place and picked up another pair of headphones and a video camera. Hopefully I’ll get some good stuff from the conference and some interviews to boot.

Tomorrow… get Digital tapes for the camera, get glossy card stock for the lame business cards I have to print myself - fortunately they send you an image file of your soon to be printed cards so I’ll just print some up. And.. hrmm I guess I don’t need anything else. Would’ve liked that 2 gigs of ram though.

If you think you’re gonna get screwed…. you will

October 20th, 2006 Rev 1 comment

So, I wanted to get business cards for MonoCast to take to the Mono Conference on Monday. So… I looked around and got a refereal from the podcasting underground to use Overnight Prints.

Great I thought… I’m cutting it close. But their site says if I order before 5 pm PST It’ll print “over night” and be shipped the next day. And then I sprung for the insanely over priced next day air. So.. technically I’d get it today. Friday. The last business day I’ll be in town before going to the conference.

I thought… hrmm this is pretty critical. It’d be my luck to get totally screwed here. I need these cards right away and I’m paying a lot for them. Afterwards they’ll be usuless. But hey.. they’re “Overnight Printing” it says so right on their site. What could go wrong?

I think you know where I’m going here…

I get an email notice today that my order is complete and they’ve submitted the billing information to UPS. WTF?! Hasn’t even shipped yet!

So yeah… what more is there to say. Accept… Overnight Printing, isn’t.

iPod Nano 1.2 Stuttering Update

October 13th, 2006 Rev 1 comment

Obviously I wasn’t the only one having this issue. But after a little research I’ve found a thread with some answers and two solutions.

The apparent cause is with mp3s “…encoded to 56 kb mono @ 44.1 kHz sampling rate…”. Converting these to AAC will supposedly solve the problem. But since it then knocks the files out of your podcast section in iTunes, it’s not really valid. This also explains why my AAC podcasts didn’t seem to have a problem.

Solution 1 - Roll back to 1.1.1.
I don’t know if I like this solution because, since Apple has had all their iPod updater download links redirect to the latest, you’ll have to go to a third party site to download the downloader (the link can be found in the thread about half way down). I’m not keen on getting things like this from other sites.

Solution 2 - Set the EQ to spoken word.
This seems to be a solid solution for folks. I haven’t tried this yet - listening to The Distillers at the moment. But it appears to work. Since most of what I listen to is podcasts I guess this’ll work fine. But Apple really should address this issue.

I guess that kinda blows my conspiracy theory that Apple was trying to nudge us into buying the new generation of Nanos. Or does it?

Apple Update

September 26th, 2006 Rev No comments

So, I don’t want to say I’m manic about checking things like package tracking and such. But now, for some reason. When I try and connect to the repairstatus page at apple from my IP I get connection refused. Hrmm.

But the last thing I saw was that the repair was finished and it was on it’s way back to the local Apple store. Hurray!

The iPod still stutters and all attempts to revert to the 1.1.2 firmware failed. I did notice that I downloaded MacCast - the AAC version - and it seemed to play without any stuttering. Yet other podcasts stutter. And never in the same place twice. I’ll rewind just after a stutter and it’s not there. So it’s not so much a bad recording as… well.. lord knows what it is.