Tag Archives: Computers

SharePoint WebPart implementing ICallbackEventHandler does not work properly in Web Part Gallery

In migrating some WebParts from SP2007 to SP2010, I came across a webpart that implements ICallbackEventHandler. This webpart was working fine when placed on the page, but did not work correctly in the webpart gallery. The specific error message being received was “The target ‘ctl00$PlaceHolderMain$ctl00′ for the callback could not be found or did not implement ICallbackEventHandler”. This error is due to the webpart being added to the preview page dynamically at runtime. Everything online I’ve seen assumes that pages doing this can be modified to load controls dynamically either in the Init event or on each Load event. Since SharePoint developers can’t affect the Web Part preview page – the best I could come up with is to prevent the registratration for callback by checking the ID of the control in the Load event. This will tell you if the control is being loaded dynamically, or if it has been placed on a page.

Here’s the code to use in the OnLoad event:

if (this.ID == null)
{
  // This occurs in the webpart gallery and causes it to throw a javascript error.
  Controls.Add(new LiteralControl("This webpart does not function correctly in the webpart gallery. Please test on a page within a webpart zone."));
} else {
  // Do what you normally do.
}

Have a better idea on how to get this to work in the web part preview page? Let me know. At this point I’m content not throwing the javascript error.

ASP.NET Padding Oracle

I’m doing research to better understand the padding oracle attack that was recently disclosed to affect ASP.NET and thought to provide a quick list of links that I’ve found most helpful:

The ASP Classic is the most unexpected bit to me, but makes perfect sense.

Update:
Patch your servers, as the padding oracle is no longer needed. Thanks Matt!

Remote PC Help

Tonight I got a chance to use LogMeIn Rescue and found it a very nice experience for helping a family member with their PC. Knowing it was a trial – I checked the license price…thinking that those I help could fund the license if it was cheap enough ($50-$150?). Well – It’s $1188 for a year subscription! This is really too bad for the helpful IT relative – unless you’re running a business it’s just not worth it. They should mark the price way down and limit you to say 4 connections a month or something…

So – a little Googling for a cheaper alternative revealed TeamViewer – which is free for personal use and looks to be fairly full featured. I’ll be using this next time somebody needs some PC help.

Windows 7 x64 Ultimate – Taking the plunge

I’m just about finished backing everything up off of my main machine (Windows 7 32-bit Ultimate). I’ve heard alot of good things about Windows 7 (read quite a bit too) – and even decent things about the install process. What’s tying me to Windows is Fallout 3 and the random Windows-only game…sorry Ubuntu, I love ya’ but we just can’t go steady yet.

I’ll update this post as I install and use this new OS. It feels like getting a new computer!

Update 2:41pm
I started the install at 2:20 and am typing this from the same machine with Windows 7 now. Checking the device manager, I’ve got only 1 device (my ATI TV tuner…don’t buy one of these) not recognized. Next up – Video drivers, TV Tuner drivers, and some apps.

Update 3:16pm
It looks like my ATI TV tuner doesn’t have a listed driver available for Windows 7. Some searching revealed that some had success with using the Vista 64 bit driver from the ATI downloads page. I installed this driver, but the device manager still showed the unknown device. Choosing to “Update driver”, I pointed the wizard to the location that the ATI installer had unpacked all the files to (C:\ATI). Windows picked up the driver and it’s now listed as “ATI Unified AVStream Driver”. I’m still configuring Windows Media Center, so I’m not sure if this will all work out – but the driver installed fine.

Update 3:50
TV Tuner works fine. Getting signal out here in the stix is another matter :)

Update 5:47
Got some of my apps installed. Restored Fallout 3 from the backup I created back into Steam – only to have to do the Games for Windows Live dance (don’t update through the game, go get the standalone client). Oh – and doing a steam backup of the game doesn’t capture any downloadable content you’ve acquired through GFWL. Bummer… at my current internet speed rate – I should be able to play Fallout 3 sometime next week.

Overall at this point I’m liking Windows 7. The real test comes tonight when I reshare my printer to another Windows XP box in the house. Vista was terrible with this…I had to restart the print spooler and open the printers window every time that machine needed to print. Here’s hoping it’s gotten better in 7.

Update 10/25/2009
It’s been a good while since I installed and I haven’t longed for XP or Vista at all. Printer sharing worked fantastic! No more restarting the print spooler. Fallout 3 finished installing and it ran the hardware check to auto-set my video settings. It auto-set higher settings than my Vista install did – now I can see NPCs faces :) Good times.

Fixing a jumpy cusor/pointer on your optical/laser mouse

Minutes ago, I started to use my Microsoft Wireless Laser Mouse 6000 (v2.0)…and the pointer was jumpy…kinda jittery…whenever I moved it left to right. Up and down was fine though. I resynced the mouse, replace the batteries, and even restarted…still it was jumpy. I’ve long since lost the receipt to this mouse (which I really like…would hate to replace it) – so did some searching for others who may have had this issue. Found this great post: http://www.pluralsight.com/community/blogs/keith/archive/2008/03/05/50374.aspx . Basically – the little diode under the mouse can get dust or hair on it and cause this problem. Don’t throw away your mouse, just blow some air on the diode! Fixed mine right up…

And here I was dreading going to Best Buy…

Antec Sonata 3 front fan location

I looked for this before when I was putting my new computer together and was unable to find where the optional front fan mounted…I was expecting between the metal inner case and the outside plastic. See pic for where it mounts:
So ya – it does have 120 mm fan mounts there. Good to know.

Laptop BIOS/CMOS reset = pain

This post is for those individuals looking to see if this is possible… I just reset the BIOS on an HP Pavilion ZE4900 (laptop) by removing and replacing the CMOS battery. The online manual doesn’t show its location – but you need to complete disassemble the laptop down to removing the main board. The CMOS battery is located on the underside of the board toward the front of the laptop. Needless to say – the last four hours are hours I’ll never get back :-/

The little Linux Box that could

I decided that in order to tinker without disrupting the smooth operation of my workhorse PC, I ought to just build a testing box. In the event that I can actually tinker enough to stop wanting to tinker (like that’s going to happen), I also wanted the PC to serve a dual role as an eventual Media Center PC (Windows or otherwise). So I laid out some requirements:

  • Multiple Core – I’ve read that the latest versions of software that play High-Def video (DVD & Blu-Ray) recommend having dual core. No reason to skimp on this as many inexpensive CPUs have this now
  • Onboard DVI – While I may eventually get a better video card for this system, having the ability to otuput to my HDTV using a DVI->HDMI converter will come in really handy.
  • Small Case – I’ve owned plenty of too-huge computers. This should be able to blend into my entertainment setup
  • Maximum Linux compatibility – If I’m going to be running Linux and don’t want headaches…Linux needs to be able to recognize my hardware pretty much out of the box. Not that I can’t install drivers/whatnot – but the most promising thing when putting together a machine and installing the OS is actually seeing that none of your hardware is DOA.

With these goals, I set out to find the parts I wanted. I’ve had mostly good experiences at Newegg, and chose to use them again. After several hours of comparison shopping and checking the Internet for Linux compatibility – I came up with this setup:

  • Case: Apevia X-QPack link
  • Motherboard: ASUS M2NBP-VM CSM link
  • Processor: AMD Athlon X2 3800 (Socket AM2) link
  • Ram: Kingston DDR2 533 1GB link
  • Hard Drive: WD 320GB SATA link
  • DVD Burner: LG 18X link

At the time I purchased the parts – the Intel Core 2 Duos were definitely outperforming their AMD counterparts. However, the Athlon X2 3800 was cheaper than any Core 2 Duo. I’ve also had good experiences with Nvidia chipsets & Linux – so what the hey. I got the ASUS motherboard primarily because of my excellent experience with prior ASUS mobos. It’s also nice that it has onboard DVI.

Everything arrived quickly and nothing was DOA. I did experience some minor sound issues with different Linux distros and Windows – but not enough to call the motherboard defective or anything. Probably more of a driver issue. If you are using this motherboard under windows – I would suggest uninstalling the Nvidia firewall which is installed when you use the unified driver on the ASUS CD. Find another firewall… Never really liked the Nvidia one.

I’ll detail my Linux installation fun (fun is also code for excrutiating frustration in some cases) in a future article. Thanks for the read!