Archive

Archive for the ‘Tips’ Category

Date Ranges in Log Parser for EventLogs

April 27th, 2009 No comments

If you need to trawl through your production server event logs. Here’s a quick tip for extracting just the entries for a given date range using LogParser. BTW Visual LogParser is a must have, it even downloads and automatically installs the latest version of LogParer from MS.

SELECT  TimeGenerated, SourceName, ComputerName, Message FROM C:\Downloads\May09-ErrorLog\AppLog\*.evt
WHERE TimeGenerated BETWEEN timestamp(’04/04/2009′, ‘dd/MM/yyyy’) and timestamp(’06/04/2009′, ‘dd/MM/yyyy’)
ORDER BY TimeGenerated desc

Categories: Tips Tags: , , ,

Making your portable hard disk work with the XBox 360

April 20th, 2009 2 comments

I like using my XBox as a media center. But when I plugged in a portable HDD to the 360 but it didn’t show up as a disc. Didn’t work on the Samsung home theatre as well. A quick google and I figured out the disc was formatted as NTFS (right-click Properties on your drive to check) on which is not supported by the 360.

Okay so backed up the data and when I try to format as FAT32 there is no such option on the Explorer ‘Format’ dialog. It’s either NTFS or exFAT, couldn’t figure out if the 360 supported exFAT (should have tried) so went about trying to format from the command line. Which does have a switch for FAT32.

Unfortunately format.exe complains that the partition is too big. What I should not have done was to try a quick format.

Instead I went about deleting the partition as mentioned by several sites. There’s a good one built into Windows (Disk Management) that you can get through from ‘Computer Management’. So right-clicked on the external disc and did a ‘Delete Volume’. And then right-clicked and created a new volume. [NOTE: I think the whole delete and create a new volume can be skipped if you already have the partition in NTFS).

Next tried the format.exe again. Still fails complaining that the disc is too big. At whim tried formatting without the /Q (quick format) option. Worked fine.

Here’s how you would go about it (replace Q: with the drive letter of your portable disc).

C:\>format Q: /FS:FAT32

Categories: Tips Tags: , , ,

Microsoft .NET Framework 3.5 SP1 breaks Microsoft CCF (Customer Care Framework)

February 26th, 2009 2 comments

So your seeing this exception in your WCF client application after installing SP1 on .NET Framework 3.5

System.ServiceModel.Security.MessageSecurityException occurred Message="The HTTP request is unauthorized with client authentication scheme ‘Negotiate’. The authentication header received from the server was ‘Negotiate

As described in this bug report Microsoft classifies this as a known issue, with the bug being resolved as ‘By Design’.

Your fix is to add an identity element to the WCF endpoint like this.

<identity>
    <userPrincipalName value="WcfServiceAccount@domain" />
</identity>

But the problem with CCF is that the url for some of the endpoints are read through code from a database and set through the proxy class. Now when you do this the identity from the config file does not flow through resulting in the same exception you see above.

One option is to uninstall the service pack on the client. This is not as easy as it seems because the the 3.5 service pack also updates assemblies in the 2.0 and 3.0 frameworks to their SP2 levels.

To get back to pre 3.5 SP1 you need to uninstall all the frameworks and re-install them again avoiding the 3.5 SP1. The exact steps to do this is outlined here by Microsoft engineer, Aaron Stebner.

But what if you don’t have the luxury of walking all your end-users through the uninstall? A suggested fix from Microsoft (targeting CCF) is as follows:

  1. Set up a cNAME in DNS for the servername you are using in database urls.
  2. Use setspn -a HOST/CNAME domain\apppooluser
  3. Change all the database urls to this CNAME
  4. Do an iisreset
  5. Test

For example if the database urls are http://ccfserver/…..

  1. Create a  CNAME CCFALIAS in DNS
  2. setspn -a HOST/CCFALIAS ccf\aspuser
  3. Change all database urls to ccfalias
  4. iisreset
  5. Test if you reach /urls with this alias from web servers and from clients

Be careful not to set HOST/CCFSERVER spn for aspuser. Note we are setting HOST/CCFALIAS spn which is CNAME for ccfserver in DNS. If by mistake you set host/ccfserver it can wreak havoc  for Kerberos.

Categories: Tips Tags: , ,

Another Dell XPS M1330 tip: External Display Flicker

February 17th, 2009 9 comments

Although five of us have exact same setup, I am the only one at work to experience the external display flickering. I tried everything from downloading all the latest updates from the dell site, mucking around with all the display options to no avail. I even plugged in my XPS to a couple of my colleagues displays (in high hopes of stealing it if it worked) but no, it had to flicker for my laptop. Whereas they would happy go about their merry day with a crystal clear and crisp display while I looked on enviously.

I finally got fed up today when the flickering worsened and asked Google again, “why me?” and Google replied “You are not alone”, the only problem was that I had to go through Google cache as Dell seems to have pulled the plug on this particular page.

Thankfully Brandon (aka GadgetPhreak) had found a workaround and posted it way back in Dec 07, here’s what he says.

I purchased an XPS M1330 configured as follows:

  • SYSTEM COLOR: Tuxedo Black
  • PROCESSOR: Intel® Core™ 2 Duo Processor T7500 (2.2GHz/800Mhz FSB, 4MB Cache)
  • OPERATING SYSTEM: Genuine Windows Vista™ Business Edition
  • LCD AND CAMERA: Slim and Light LED Display with VGA Webcam
  • MEMORY: 3GB Shared Dual Channel DDR2 at 667MHz
  • HARD DRIVE: Speed: 160GB SATA Hard Drive (7200RPM)
  • INTERNAL OPTICAL DRIVE: CD/DVD burner (DVD+/-RW Drive)
  • VIDEO CARD: 128MB NVIDIA® GeForce™ 8400M GS
  • WIRELESS CARDS: Intel Next-Gen Wireless-N Mini-card
  • BLUETOOTH AND WIRELESS USB: Built-in Bluetooth capability (2.0 EDR)
  • BATTERY OPTIONS: 6 cell Primary Battery and 9 cell additional Lithium Ion Battery
  • SOUND OPTIONS: ExpressCard Sound Blaster X-Fi® Xtreme Audio Sound Card
  • FINGERPRINT SCANNER: Biometric Fingerprint Reader

I attempted to connect it to the same external monitor used with my XPS 1210 (a 20" Viewsonic VX2025wm LCD with a native resolution of 1680×1050) and where I used to get a crisp, clean, flicker-free image with my M1210, I now get a lot of screen flicker.

I did some research and found someone running a similar type of LCD who had better luck with using an HDMI to DVI-D adapter and ran it into the DVI input on his monitor.  However, that didn’t work for me.

In trouble shooting this I found something interesting, when I remove AC power to my laptop while connected to the Viewsonic, the flickering stops.  When I reconnect it the flickering starts up again.  This is true regardless of what resolution I am running on either the laptop or Viewsonic.  I went through the advanced power settings and tried looking for differences for when the AC is plugged in vs. when it’s running on battery.  I also tried re-installing video drivers, as well as the latest Nvidia drivers from Dell downloads.  Nothing has resolved this yet.

Suggestions?

Thanks in advance,

Branden

 

And behold I pulled out my power cable and the flickering stopped! Now I’m off to customer support to see if I can get an HDMI to DVI cable ;)

Categories: Tips Tags: , ,

Windows 7: New Keyboard Shortcuts

February 13th, 2009 2 comments

There are quite a few new keyboard shortcuts in Windows 7 and some of them are a godsend when working on a multi-monitor setup. I can finally retire UltraMon just to get a keyboard shortcut for switching windows between monitors.

There are new shortcuts for maximizing, restoring and minimizing windows as well. I will now be retiring an old keyboard shortcut that I’ve been using since Windows 3.1 (if you didn’t know Alt+Space, X for maximizing and Alt+Space, R for restore and Alt+Space, N for minimize).

Here’s a full list of the new keyboard shortcuts from TechNet, I couldn’t get the Win+(+/-) Zoom working though.

Windows 7 beta 1 includes some handy new shortcut key combinations that allow you to navigate and manage the Windows workspace more efficiently. Here are 10 new Windows 7 shortcuts that will help you speed up your workflow (“Win” means the Windows Key):

Win+Home: Clear all but the active window
Win+Space: All windows become transparent so you can see through to the desktop
Win+Up arrow: Maximize the active window
Win+Down arrow: Minimize the active window or restore the window if it’s maximized
Win+Left/Right arrows: Dock the active window to each side of the monitor
Win+Shift+Left/Right arrows: If you’ve got dual monitors, this will move the active window to the adjacent monitor
Win+T: Shift focus to and scroll through items on the taskbar
Win+P: Adjust presentation settings for your display
Win+(+/-): Zoom in/out
Shift+Click a taskbar item: Open a new instance of that particular application

Categories: Tips Tags: , ,

Dell Studio: Slow mouse (touchpad) and missing keys issue

January 31st, 2009 6 comments

Just before I installed Windows 7, the new Dell Studio suddenly started slowing down. The touchpad movements would be jerky and some keys wouldn’t get pressed. A post on a dell support forum outlined the same problem that I had and the keys the other user reported were the exact same ones.

What’s even worse is that the support site is so bad I can’t even locate that forum post. But here are a couple I found reporting the same problem (one with keyboard problems here and another with touchpad problems).

Draining the battery power was one suggestion but couldn’t be bothered doing that, I just went with updating the BIOS to the latest version (A05) and viola that fixed it.

So here’s to anyone having the same problem with a Dell Studio where the whole machine goes into slow motion when moving the mouse with the touchpad as well as when punching in the keys into the keyboard go missing. Solution: Update your BIOS to the latest version.

Categories: Tips Tags: , , ,

Migrating from BlogEngine.NET to WordPress

January 23rd, 2009 17 comments

Yet another migration post, feels like just yesterday I migrated from dasBlog to BlogEngine.NET.

My justification was that I didn’t want to be manually updating my blog with each new release.

With Aneef graciously offering to host my site I’d be cutting down on my hosting bill as well! How sweet is that?

So here’s how I made the move.

  • First I setup a new instance of WordPress on my host account. Now this is the absolutest fun part, with Fantastico it takes just two clicks and literally two seconds to install WP, plus upgrading to the latest version of WordPress is going to be a breeze as well!

fantastico-wordpress-install

  • Next we’ll export our posts to BlogML from the BlogEngine.NET admin site.
  • You’ll need to tweak this file a bit before the import. Search for .axd files and you’ll realize the first problem. BlogEngine seems to pull down the images through an .axd file, a simple search and replace should fix this problem. You might want to move your images to the wp-content/uploads folder as well since it will become easier to backup your stuff.
  • In the BlogML file, the categories seem to have a GUID, which I think I might have inherited from dasBlog, but if you do come across the problem you can either do a search and replace with the GUIDs or after importing into WordPress rename the category from the Admin site.
  • Finally you’ll need to add the BlogML Import plugin to your WP install. Just grab the zip file from Kavinda, unzip and upload them to the wp-admin/imports folder check his post and the related posts if you have trouble setting it up.
  • From the WordPress admin menu click import, supply your file and your done!
  • You’ll of course need to upload your images as well.
  • If your using FeedBurner remember to change the source address of FeedBurner and also use the FeedBurner plugin from Google so that new user’s will get the FeedBurner url when they subscribe to your blog.

Enjoy! Let me know if you have any issues migrating.

Categories: Tips Tags: , , ,

Copy Paste Unformatted Text in Word

April 3rd, 2008 No comments

I was reading this old series of posts on the whole Office Ribbon bar design (quite a fascinating from a developer perspective). I came across the comments where quite a few have ranted on the 'paste unformatted text' as being more preferred than paste. I too used to be in that same group but that was before I came across this whole section dedicated to configuring copy-paste under the Advanced tab in Word options. Here you can configure the default paste action. For keyboard freaks there's always the Alt+H, V, S to get to the Paste dialog.

While we're on the topic of Copy/Paste. Do yourself a favor and install ClipX, you have absolutely no idea what your missing.

Categories: Tips Tags:

Creating HTML Signatures on Outlook 2007

March 13th, 2008 46 comments

Outlook 2003 had a nice feature that allowed you to create a signature from an HTML file. This went missing in Outlook 2007 and a google search for Outlook 2007 signatures brings up a number of posts with people asking for help on how to do this.

ScottH posted a tip that showed you how to do it but it involved editing an obscure html file, the location of which varied from XP to Vista.

The solution is quite simple really and left me scratching my head as to why I didn't think of it before. All you need to do this is the humble copy and paste.

Using a browser open up the html file that you want to embed as your signature, highlight everything and copy/paste it to the signature window in Outlook 2007.

Here is a step-by-step on how to do this.

1. Create your signature using Google Pages. Browse to http://pages.google.com (create an account and log-in if you don't have one)

2. Click on the Image button and upload the image that you want to include in your signature. Format the rest of your signature and Publish it.

 

 

 

 

 

 

 

 

 

 

 

 

 

3. In the resulting page, highlight any part of the page that you want to include in your signature and Copy it.

 

4. Switch to Outlook 2007. In a new message, on the Message tab, in the Include group, click Signature, and then click Signatures.



6. On the E-mail Signature tab, click New. Type a name for the signature, and then click OK.

7. In the Edit signature box, paste in the signature that you copied from Google Pages.  

Categories: Tips Tags:

Uploading Videos

February 2nd, 2008 1 comment

I’ve been playing with uploading videos today and MSN Video seems to outshine the other when it comes to uploading as well as viewing video.

The biggest strength being the uploader that comes built in to Windows Live Photo Gallery. With YouTube you need to wait for the whole video to upload which can take quite a lot of time, if not you need to muck around with some compression program and fine-tune the settings before doing the upload. I don’t have the patience for that.

The Photo Gallery uploader seems to compress the file as it uploads making it extremely fast.

PublishVideoOnSoapbox

UploadingToSoapbox 

Then Windows Live Writer makes it as easy as Insert->Video to allow you to pick the video that you uploaded.

Insert Video

Categories: Tips Tags: