Sunday, May 30, 2010

Assembly stuck in memory despite being replaced

I had a wonderful time this weekend trying to find out why is it that when I deployed a new version of my solution - one that included more debugging information than the previous one, nothing would come out - it would still print out the old data.
I went as far as to remove the solution entirely, make sure the GAC is clear from the assembly and then manually drag and drop my new assembly (thinking it is my WSP that is stuck with an old assembly) and still I get the old code running instead of the new one.
What didnt I do? I tried IISreset and all sort of tricks, but I could not reboot since it was not my server (partner company asking me to help out with some dev work on their server).
It turns out that if I could reboot it would have saved me all the time I spent - but then I would not have figured out the reason that was happening!

Curious? Well, here it is - I had a windows application running that used sharepoint object model to triger the timer job I was trying to redeploy. The windows application did not have a reference to the timer job code - it just used the OM to query the server what timer jobs are there and then let me choose one and execute it. So I never suspected it was the culprit - especsially since I used it to confirm the timer job was deleted after I removed the old solution.
But it was.
For some reason, just having it running, connected to sharepoint objects, somehow caused the old assembly to remain in memory\cache (I will not pretend to know why or how) and once I closed it I suddenly got the new code running!

There - if I saved someone the same frantic research I was doing this weekend, I am a happy man.

Wednesday, May 19, 2010

Last chance to register to the Australian SharePoint Conference

It is next week in Sydney! didn't you hear? I will be there, speaking about web parts and sharepoint 2010 with my friend Brian Farnhil. Dare you miss it? it is Australia's biggest SharePoint event of the year after all...

There will be:

  • 20 sessions of end user/power user/business content including some great case studies including Telstra, Volvo and a number of Industry verticals such as finance, insurance, legal and engineering
  • 20 sessions of pure technical content for IT Pro, Administrators, Developers and Analysts
  • Content is relevant to those using WSS, MOSS 2007, and new 2010 products

Special offer!
Come see me during the conference and get a 10% discount on all products by KWizCom (offer only valid for Australian and New Zealand customers).

Monday, May 03, 2010

My stupidest mistake of the year

I just spent 2 hours trying to debug why my custom web page server keeps timing out on me...It has a custom list form template that uses an override of the ListFieldIterator. What did I do wrong? take a look at my aweful code...and see if you can spot the infinite loop...

override DefaultTemplateName { get{ return this.DefaultTemplateName; } }

Saturday, May 01, 2010

To Silverlight or not to Silverlight?

I just found that having silverlight installed on my client is not always a good idea when using SharePoint 2010. Yes, it makes for a much better presentation and user interface...but...in some instances you lose functionality!

For instance, when creating a list, if you are using silverlight you get the awesome create dialog - with searching and filtering and all. And all you have to do is choose a template and give the new list a name, and that is it! all the other settings (description, add to navigation) are kept as default. Not happy with the defaults? simply click the "More Options" button and you will get the same dialog that people without silverlight get - the same one that you used to get back in sharepoint 2007.

...

Or do you?

It seems that the more options dialog only offers the basic settings for the lists - not the custom ones. For example, on a task list, the dialog is missing the option to "Send e-mail when ownership is assigned", which is shown in the settings page if you do not have Silverlight .

Since this is something that can be configured later (list settings, advanced settings), I guess it is not going to be high on the priority to change, but it does irk me that by installing Silverlight I am actually losing some settings when creating the list that I used to have before Silverlight .

an idea for SP1?