Wors World
All About Wor

Nov
10
I spent yesterday looking at the use of Silverlight in Sharepoint without too much success.
 
I got cracking on my WSS VPC and started by building a simple Silverlight app using VS2008.  The Silverlight app template will build either a web site or a single html page which hosts your Silverlight app.  This all went well and my "Hello Silverlight World" app was soon up and running.
 
Looking to get this into Sharepoint I opened the November issue of MSDN which has an article "Light Up Sharepoint With Silverlight 2 Web Parts" and read through the steps.  The 1st thing I noticed was that the artcle was writte with Silverlight Beta 2 and I have the RTM version.  Anyway, the technique is to host your Silverlight app in a web part and add the web part to the SP site.  In VS2008 I created a web part and implemented the 2 methods (OnLoad & CreateChildControls) needed to load the Silverlight app.  I built the web part and deployed it to my SP site (via the debug setting on the web part project).  I copied the .xap (Silverlight app) to a newly created ClientBin/XAP directory under the SP virtual directory.
 
In to my SP site and I edited my web page, adding my new web part to the page.  The Silverlight app was not displayed in my web part.  Hhhmmm.  I checked the application log and web site logs for ny clue – nothing.  I attached VS2008 to the SP web (I used iisapp to find exactly which process was hosting SP), added a breakpoint on the OnLoad event of my web part and refreshed the page.  Both, the OnLoad and CreateChildControls methods were executed without issue but still no Silverlight app.
 
Another review of the magazine article showed that there were some web.config changes to make relating to Silverlight and I cracked on and made the changes.  I restarted IIS (not strictly neccessary but I like to be sure), refreshed the page – still no Silverlight.
 
I read blog after blog about this and discovered that there are differing thoughts around what needs to be done to get Slverlight deployed and I tried them all – the majority of blogs are still relating to Silverlight Beta 2 not the RTM version.  I visited the MSDN labs section and took part in a lab session for integrating SP and Silverlight and I managed to deploy a Silverlight app no bother.  I looked in the web.config for the SP site and didn’t see the changes that the MSDN article recommended.
 
I returned back to my VPC and accessed the Silverlight streaming service from Microsoft.  I created an account, created a simple app and copied the provided HTML into a web content web part on my page.  Result – the Silverlight app was displayed in SP!  I reckon that this means that Silverlight is not installed/configured correctly and I’m prearing myself to painstakingly check that all of the required code is in place on my VPC……
Nov
10
Microsoft continue to release the CRM Accelerators to Codeplex.  The Accelerators are a collection of CRM add-on solutions, that are available, free of charge, to anyone who wants them.  So far, they’ve released only the Event Notification, Extended Sales Forecasting and Event Management solutions.  I’ve had a look at these and they appear great – I particularly like the ability to monitor CRM entities via RSS.
 
Each accelerator comprises of custom CRM entities, reports, workflows etc., and if they don’t do exactly what you want them to, roll your sleeves up and knock them into the shape you want.
 
Recommended.
Nov
06
So I’ve set out to write a bit of code that will periodically pull data from a WCF service and insert it in to SP.  The code will be executed by the SP Timer Service to gain the scheduling ability of that service.  I didn’t want to add the generated WCF config to the web.config as it doesn’t feel like the right place to add it and a custom config location is probably the way we’ll go.
 
So I wrote the code (extending SPJobDefinition), added a reference to the WCF service, built my endpoint by hand, deployed the code into SP, attached to the SP Timer Service in the VS debugger and waited.
 
The SP Timer Service kicked off my code and I encountered an exception.  I stopped the debugger, made my changes, rebuilt the code, reset IIS (cos SP is essentially a web app), attached to the SP Timer Service with the VS debugger and waited.
 
Once again, the code threw an exception (the  same one).  So I stopped the debugger, rebuilt the code, reset IIS,  attached to the SP Timer Service with the VS debugger and waited.
 
Once again, the code threw an exception (the  same one).  I wont bore you wiht how many times I went round this cycle  but at some point I thought "Huh?", scratched my head, got up and got a cup of coffee.  While getting the coffee it dawned on me that while SP maybe a web app, the SP Timer service is a regular Windows service and as such, it loads assemblies into memory at 1st execution time and does not update them unless you restart that service.
 
net stop "Windows SharePoint Services Timer"
net start "Windows SharePoint Services Timer"
 
does the trick.
 
BTW, the fixed code worked a treat.
Nov
06
I’ve started to get into Microsoft SharePoint and I’m currently developing using the Windows SharePoint Services 3.0 SP1 Developer Evaluation VPC Image here.  I’ve added Visual Studio 2008 Developer edition and connected it to our Team Foundation Server.  I’ve also downloaded and installed the SharePoint Guidance – November 2008 which is here.
 
I intend to blog the odd bit as I go on to allow me to remember where I’ve been and what I’ve done.  If I write something of interest to you, that’s even better.
Nov
06
The CRM Outlook client failed to connect to our CRM server today – this occassionaly happens so I retried and had the same result.   Trying to access via a browser resulted in an Invalid Action error, numerous refreshes ended with the same result. 
 
Looking in the application log on my laptop showed

"The Microsoft CRM Outlook add-in could not be initialized correctly. Restart Microsoft Outlook and try again. HR=0x80070057. Context=. Function=CAddin::OnConnection. Line=196."

I then switched to the server event log and saw the MSCRMKeyGenerator generating events with event id 18949.  The detail was

Current active key (KeyType : CrmWRPCTokenKey) is expired. This can indicate that a key is not being regenerated properly. Current Active Key : CrmKey(Id:aaefbd4d-048b-dd11-b05a-005056c00008, ScaleGroupId:00000000-0000-0000-0000-000000000000, KeyType:CrmWRPCTokenKey, Expired:True, …………, ArchiveLength:1, Enabled:True, ActiveKeys:[ScaleGroupId=00000000-0000-0000-0000-000000000000,ActiveKeyId=aaefbd4d-048b-dd11-b05a-005056c00008])

I looked through the services running on the server and noticed that the CRMAsynch servce was not running.  Starting it up caused the MSCRMKeyArchiveManager to start and the MSCRMKeyGenerator to create a new key which fixed the problem.

Oct
23

After sorting out the client asynch issue I then ran into this

This MSDCRMDMM was working a month or so ago.  What causes s/w to silently explode like this? In this case I’ve no idea so what I’ve done is removed the app and reinstalled it from here.  You must delete the MSCRM_MIGRATION db that is left over before reinstalling.

That seems to have fixed the problem.  It might haMSCRMve been due to a password change on the account I was logged on as – MSDCRMDMM only seems to ask for this at setup.  If it wasn’t so late (23:00) I’d try to figure out why but "times a pressing….."

Oct
23

A while ago I noticed that a service MSCRM Asynch Service (client) had appeared on a CRM server of a client of ours.  I wondered what it was but it didn’t seem to be causing any issues so I ignored it.  I had noticed that this service wasn’t on our own CRM installation, but again I didn’t worry too much.  I Googled for it a few times and came up with nothing.

Today, I’ve been using the Microsoft Dynamics CRM Data Manager (Phew, even the acronym, MSDCRMDMM, is a pain to type!) and whilst signing in I was presented with the following screen

 

Finally!  This is what uses the client version of the Asynch Service.  Even a conversation with a Microsoft CRM man had not shed light on this.

Into the W2003 admin tools, start up the service

and away we go

Sleep will come easy tonight 🙂

Oct
03
My knee has still been giving me some grief so I went back to see the man and he organised a knee op (arthroscopy) for me on the next Wednesday.  As my son was being married 3 days after that, I was told, by my SWMBO to have the op after that so the date was set for the 1st October.
 
I went into hospital on the Wednesday lunchtime and the op was carried out at about 18:00.  I came round sometime after about 20:00 and was told that a piece of knee bone/cartlidge had been removed and that a piece of exposed bone had been recovered and a general clean out of loose bits and pieices had been done.  I was given a set of crutches, shown how to walk and how to gt up and downstairs with them (it’s not as easy as you might think) and I left hospital on the evening of the 2nd.
 
I got up this morning (3rd) and my knee is swollen an sore.  I hobbled to the front door with my crutch and picked up the post that had just arrived……
 
A package embalzoned with "Flora London Marathon" had arrived and as I opened it I knew what to expect – "Congratulations  – you have made it through the ballot and you’re in for the 2009 marathon" 😦  Brilliant, Richard a mate of mine has applied for 4 years on the belt without getting in through the ballot (he finally got in on the 5 attempts rule) and I get in through the ballot 2 years running (albeit 3 years after my last attempt).
 
I think I’ll be exercising the "defer to next year" option available to me….
Aug
27
An hours gentle cycling with Adrian today.  Knee still seems good.
 
I’m looking at another 2 weeks or so before I try a gentle run.  I’m going to try a couple of laps of the local nature reserve which should be less stressful on my knee due to the slightly soft ground.  Can’t wait.
Aug
27
I managed a 3 hour bike ride on Saturday with Bunder whilst he ran – not too taxing but good exercise and it feels like my knee is getting better.
 
I’ve just got to be careful pushing up hills (or ride on the flat).  I’m trying a "left leg only" on hills technique which is exhausting for the left leg but doesn’ stress the right.
Design a site like this with WordPress.com
Get started