Archive for September, 2009

Speed up Virtual PC

Thursday, September 24th, 2009

Here are some tips to speed up you Virtual PC from my experience:

  1. Run you VPC from an external hard drive or a drive other than your primary Windows drive (partitions on the same physical disk doesn’t count and won’t improve speed).
  2. If you’re using an external drive it should preferably be connected via eSATA (#1 choice) or FireWire (yes I know that USB 2 is in theory faster than FireWire, but FireWire has better continious data through-put).
  3. If you are using a differential disk I found that VPC runs faster with the differential disk on the your PC (Windows) drive and the parent drive on the external drive (and not the other way around which is considerably slower: even slower than having both virtual drives on the external drive).

On a side note I do not recommend running VPC on your main PC (Windows) drive for prolonged periods.  It puts a lot of stress on the drive trying to cope with bot Windows page file writes etc. and meeting the demands of the VPC, especially if you have a low RAM config (2Gb or less).  I have had at least 2 drives dying rather prematurely because of constant VPC usage.  Although there is no way to prove this, identical drives (same batch) lasted much longer (in fact still lasts) than the ones used for VPC.

New generation big screen Windows Mobile phones

Saturday, September 19th, 2009

I’m in the market for a new Windows Mobile phone. For me the most important aspects are screen size, processor speed, memory and battery life.  These are the ones I’m considering at the moment (all information sources from GSM Arena):

  1. HTC Touch HD: One of the first big screen window mobile phones, but getting a bit on in age having been released more than a year ago.  It features a 65K color,
    480 x 800 WVGA, 3.8 inch display, Qualcomm 7201A 528 MHz processor, 288 MB RAM, 512 MB ROM and a 1350 mAh Li-Ion battery.
  2. Samsung Omnia II i8000 (also dubbed the Samsung Omnia Icon): This is a brand new release from Samsung following on its predesessor the Omnia i900 (which I seriously considered a while back).  It features a 65K color AMOLED 480 x 800 pixels (WVGA), 3.7 inch display, Samsung S3C6410 800MHz processor including a dedicated graphics accelerator, 2/8/16 GB storage, 256 MB RAM and a 1500 mAh Li-Ion battery.  Currently this is the one I’m favoring, the AMOLED display, processor and battery makes it a good option.  It currently ships with WinMo 6.1, but will have a free (in most cases) upgrade to 6.5.
  3. Acer F900: Released under the radar earlier this year without much press attention.  Acer bought the PDA/GPS company E-ten and their range is based on the E-ten models.  It features a 65K color, 480 x 800 WVGA, 3.8 inch display, Samsung S3C6410 533 MHz processor,128MB RAM, 256MB ROM and 1530mAh Li-ion battery.  This phone offers good value for money since it is much cheaper currently than the others listed here.  It is a shame about the low RAM/ROM, but it compensates with a microSD slot and a good battery.  It is apparently more responsive than the HD Touch.
  4. Toshiba TG01: The much hyped and yet to be released model features a 256K color (65K effective) 480 x 800 WVGA, 4.1 inch display, a Qualcomm Snapdragon QSD8250 1 GHz processor, 256 MB RAM, 512 MB ROM and a 1000mAh Li-ion.  For me the screen size pushes the phone over the edge of being comfortable enough to carry as a phone.  The weak battery is also disappointing, hopefully this will be beefed up when the phone is released.
  5. Acer F1: Now here is an interesting phone I stumbled upon by chance.  It is pipped to be releases in October and there has not been much press on it, but check the features (not listed on GSM Arena yet, but can be found here): 65K color, 480 x 800 WVGA 3.8 inch display, Qualcomm 8250 1 GHz processor, 256 MB RAM, 512 MB ROM and a 1350 mAh Li-ion battery.  Very impressive.  The battery could have been a bit better, but this phone may actually be a contender.  The price is likely to be less than both the Toshiba and Samsung phones which makes it even more attractive.

Windows Mobile 6.5 also promises to have improved performance and responsiveness. I can vouch for this: I loaded a cooked 6.5 ROM on my HTC and must say was impressed with the responsiveness even on my old 200MHz phone.

Now for the difficult part – which one to buy: currently I’m leaning toward the Omnia II.  Once I have made the decision I will do a mini review on it.

Setting SharePoint Email Frequency

Tuesday, September 15th, 2009

Sometimes, especially when you’re a developer, you need to speed up (or slow down) the frequency at which SharePoint checks and sends email. This can be done by using the stsadm tool from the command line. You can check the current frequency by issuing this command:

stsadm -o getproperty -pn job-immediate-alerts -url http://your_sp_site

This will return a value of something like “every 5 minutes between 0 and 59″ which means it’s checked every five minutes.

To adjust the interval for example to 3 minutes, you can issue the following command:

stsadm -o setproperty -pn job-immediate-alerts -url http://your_sp_site -pv "every 3 minutes"

I find it usefull especially when I’m testing email related workflows to set the interval down to 1 minute.  In a production environment this may be a bit intense and depending on the criticality of your SharePoint installation you may even want to set it as low as every 10 minutes.

Custom workflow: Failed on Start (retrying)

Wednesday, September 9th, 2009

I needed to check ut custom workflows for SharePoint so I created a custom MOSS 2007 workflow in Visual Studio 2008 using the SharePoint Sequential Workflow template.  I loosely followed the steps from Phil Wicklunds blog post, obviously adapting it slightly for my needs.  Upon running the workflow I got the (typical) cryptic error for the list item’s workflow “Failed on Start (retrying)“.

So I decided to follow the instructions in the post to the letter.  It worked perfectly! So I tried again to create on of my own, referring back to the instructions and what do you know? Same error again! After a lot of time spent tweaking, changing building deploying, testing deleting list items etc. I found the problem(s).

When I created my workflows I started with the template then renamed the workflow class file to something more descriptive than “Workflow1.cs.  And therein lies the problem!  When you rename the default Workflow.cs file you have to manually rename all references to it! (Even though you get a false sense of security from the dialog that pops up and asks you if you would like to rename all the references to the code element…blah blah blah).

So this is where you need to rename the workflow (in this example I renamed “Workflow1.cs” to “newWorkflow.cs”):

  1. onWorkFlowActivated1 properties (in design view): a) expand CorrelationToken, update the OwnerActivityName property to the new name; b) expand WorkflowProperties and update the Name property to the new name. Save.
  2. Edit the workflow designer file: Expand the newWorkflow.cs node in Solution explorer and double-click newWorkflow.designer.cs.  Expand the “Designer generated code” region update activitybind1.Name and activitybind2.Name to “newWorkflow”. Also check for other references to the original “Workflow1″ value.
  3. Update workflow.xml: change the “CodeBesideClass” property to reflect the updated class name (for example “SharePointWorkflow1.newWorkflow” in my case).

Finallty after spending hours chasing the cryptic error I got it working.  Let this be a lesson on trusing automated features to fix your code!

Please let me know if I missed anything in the list above!

Renaming a MOSS virtual server

Wednesday, September 9th, 2009

I recently had to rename a virtual PC with a MOSS 2007 test environment because of network naming conflicts.  After trawling the web I came up with the steps below.  Start with the steps below before renaming the server (renaming the server is part of the steps).

  • Decide on a new server name :-P (for this example we’ll use OLDSERVER and NEWSERVER as the old and new names for the server).
  • Update all the alternate access mapping URLs to point to the new server name via Central Administration (Central Admin > Operations >Alternate Access Mappings).
  • Run the server rename command from the command prompt (Start>Run…>cmd). If your SharePoint bin folder is not included in the server PATH, then you’ll have to run it from the bin folder (default location is C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN):

stsadm -o renameserver -oldservername OLDSERVER -newservername NEWSERVER

  • Rename the server.
  • Reboot the server.
  • Update the farm credentials by running the stsadm command line tool from the command prompt (Start>Run…>cmd):

stsadm -o updatefarmcredentials -identitytype configurableid -userlogin NEWSERVER\administrator -password adminpassword

  • Reset IIS from the command prompt (Start>Run…>cmd):

iisreset /noforce

  • Check application pool identities in IIS Manager.  Update the application pools that still reference the old server name only.  Leave any application pools running on system accounts unchanged.
  • At this point I did another IIS reset just to make sure everything gets refreshed.

Notes
1. In some cases you may need to rerun the SharePoint configuration wizard to reconfigure SharePoint.  In extreme cases you may have to resort to an in place upgrade via the stsadmin command line tool.
2. These steps were performed on a MOSS 2007 SP1 installation.

Disclaimer:
As mentioned I used it to rename a virtual server in a test environment only.  I do not think renaming a production server is EVER a good idea.  I’m not responsible for any damages or negative impacts these steps may have.