Resolving the AppFabric: ErrorCode<ERRCA0017>:SubStatus<ES0006>
AppFabric Caching has one error which you will learn to hate:
ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified Cache servers are unavailable, which could be caused by busy network or servers. Ensure that security permission has been granted for this client account on the cluster and that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Retry later.)
This message could mean a variety of different things, such as:
- Client vs. Server security is wrong
- Disposing the factory too soon
- Not enough physical memory
- Corruption of the cache
However for me none of those were the cause of my pain. My issues was:
Copy & Paste Stupidity
I copied and pasted the settings for my deployment and so I had the following config issue:
<dataCacheClient> <!-- cache host(s) --> <hosts> <host name="cacheServer1" cachePort="22233"/> </hosts> </dataCacheClient>
However my server was DEMO-PC, so I needed to change that to the following:
<host name="DEMO-PC" cachePort="22233"/>
The only way I found this was to hit the event log and scroll down through the error message. About halfway down was the cause, as clear as day.
It's MVP time again
Exactly a year and a day ago, I blogged about being awarded a MVP from Microsoft and I am proud to announce that I have been awarded a MVP for a second time!
Thank you to all that were part of making this happen, I am very honoured by all of you.
What is an MVP? In short it is a thank you for helping Microsoft communities. The long version can be found here.
My planning for MVP Summit in Feb/Mar has already been done so I am looking forward to seeing the other MVP’s and product team!
I would also like to congratulate my fellow January MVP’s in particular the South African ones: Zayd Kara (ALM for the second time) and new to the MVP’s Veronique Palmer (SharePoint).
Reporting Services - Missing features in SRS 2008
I recently helped on an interesting problem with SQL Reporting Services, where features of SRS 2008 were just gone!
History
The team had created a number of reports in SQL Server 2005 and used them successfully for a number of years. During their upgrade to SQL Server 2008 they needed to upgrade the reports to SRS 2008 format.
To be clear here, SRS doesn’t support backwards compatibility so if you want to run a report built in 2005 on a 2008 server, it must be upgraded. Thankfully this is a simple process, just open the report solution in Business Intelligence Development Studio (BIDS) 2008 and it will upgrade it.
The Problem
The team knew this process and opened the 2005 reports in BIDS 2008, no errors were reported, all reports saved correctly and were published to the SRS server. The server then rendered them, which to everyone meant that the reports had upgraded successfully.
However there was some changes to how the reports were rendered and the team needed to change the ConsumeContainerWhitespace property on the report to true to fix that rendering issue.
This is a new property in 2008, and the problem the team had is that when the report was opened in BIDS 2008 the property just wasn’t there! They could create new reports and see it, but their existing reports did not contain it.
Diagnosis
My first thing to check was that they were opening the right version of BIDS – this is the SRS persons way of saying “Have you tried turning it off and on?”.
They verified that quickly, so my next step was to check if BIDS was actually doing the upgrade. A report is just an XML file so you can open it up in notepad and check the schema to verify what version of the report it is. If it is http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition it is a 2008 report and if it is http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition it is a 2005 report.
You know what, after the upgrade it was STILL showing as a 2005 report! This confused me to no end – how could SRS 2008 render a 2005 report and why was BIDS not upgrading it?
Solution
I was close to getting the team to call Microsoft, or an exorcist, for assistance – but re-reading the email conversation between the team and me a number of times I stumbled across the piece of missing information which explained the cause. The team was using .rdlc files – these are SRS files designed for client side rendering. SRS supports these and the “normal” .rdl files.
The interesting thing about .rdlc files is that they are frozen on 2005:
- So they do not get new features of 2008 or 2008 R2, which is why the new properties (like the one the team wanted) does not appear.
- The schema remains on 2005 (no upgrade in BIDS)
- and to confuse everyone, they still render on 2008 and 2008 R2!
Thankfully you can convert from .rdlc to .rdl, which means then the reports get upgraded to the 2008 or 2008 R2 formats and get all the features. The team did this and have been smiling ever since!
Pulled Apart - Part XV: Understanding usage with Runtime Intelligence
Note: This is part of a series, you can find the rest of the parts in the series index.
A vital component of keeping a piece of software alive, is to keep it useful to your users – but how do you know what your users are thinking about your software and what do they think are valuable pieces of functionality?
Pull does this using a fantastic piece of software called Runtime Intelligence from PreEmptive Solutions which is easy to plug in to your application to get interesting and useful details on the usage of your application.
Lottery Winner?
Yesterday I blogged about DevExpress and today another toolset (which isn’t free) so maybe thinking I won the lottery recently – unfortunately I haven’t
What I found one July morning, is that PreEmptive gives away the software and services required for Runtime Intelligence FOR FREE,to CodePlex projects for them to use.
This may be the biggest secret of CodePlex and another fantastic reason to use CodePlex for your open source hosting.
Stats
The first interesting stat given is how many times the application has run, for Pull that is over 700 times It is always great to see that it is used.
You can then drill down on to the stats, which are publically available and provide details on what features are used, what OS’s and versions of the .NET Framework are available and also where in the world it is being used!
Technical
How do you add this to your application? It is really simple, just follow the official guide. My one word of warning is the ClickOnce, another great feature of CodePlex, doesn’t play well with this and so you want to be aware of that.
Bring your hard drive to Community Night
If you are coming to tomorrow’s community night, you want to bring your hard drive along because I will have some stuff to fill it up with:
- Visual Studio 2010 & TFS 2010 Service Pack 1 Beta Bits
- Over 8Gb of DevExpress videos (csv list below) which has something for everyone:
- If you use any of their tools or components there is plenty of short videos on using features in them.
- If you like to learn from experts they have great videos where they interview people like Jeff Atwood, Richard Blewitt, Sara Ford and Tim Heuer.
- Maybe you just want some less technical learning’s so how about, learning the GTD methodology or the science of making great user interfaces!
- The Silverlight fire starter keynote in HD, so if you care about the future of Silverlight this is a much see video.
Plus I hear that some prizes may be given away at the events too
Pulled Apart - Part XIV: DevExpress
Note: This is part of a series, you can find the rest of the parts in the series index.
I make no attempt to hide my love for a company called DevExpress which produces enhancements for Visual Studio and additional controls for WinForms, ASP.NET Web Forms, ASP.NET MVC, WPF & Silverlight.
When I started with Pull I used mostly the standard WinForm controls and over time have changed it be almost 100% DevExpress controls for a number of reasons:
- Rudi Grobler, Silverlight expert sits across the partition from me and loves to point out how ugly standard WinForms is compared to Silverlight. DevExpress helps me make my applications look MUCH better.
- Every line of code has a cost to it and the value of that line of code decreases overtime. So standing on the shoulders of giants means my cost of development is MUCH less. This also means I focus on the business aspects and not on the UI aspects.
- There is a lot of parity between DevExpress controls over different platforms, so if I want to change platform (for example to Silverlight) then I know the feature set will be close, lot’s of code could be reused.
Below is the first public version of Pull, which uses just DevExpress GroupBoxes, the rest is all WinForms:
versus the UI currently in development (for the January 2011 release) where only the status bar and web browser control are not from DevExpress! I think you will agree it looks way better now, plus there are many new features there (like filtering grids) which were not supported previously.
Grid Extensions
For the January 2011 release we switched to the DevExpress grids, which meant a lot of code needed to be changed (or just deleted) and I ended up writing a few extensions for the grids which I believe may be of use to other people:
Return a collection selected items
Rather than working with a collection of selected rows, this allows you to get the values of the selected rows:
public static IEnumerable<T> SelectedItems<T>(this ColumnView view) where T : class { foreach (int selectedRowHandle in view.GetSelectedRows()) { T item = view.GetRow(selectedRowHandle) as T; yield return item; } }
Select a collection of items
The grid normally lets you select a single row or a continuous range, however often I want to provide a list of item values and have the rows which match those values selected:
public static void SelectRows<T>(this GridView view, IList<T> selectedItems) where T : class { foreach (T selectedItem in selectedItems) { for (int counter = 0; counter < view.DataRowCount; counter++) { T item = view.GetRow(counter) as T; if (item == selectedItem) { view.SelectRow(counter); } } } }
Layouts and Strings
You can persist the layout of the grid to a stream, the registry or XML file. However I have a settings file and I would like to save and restore the layout from strings so I can easily add it to my settings file:
public static string SaveLayoutToString(this GridView view) { MemoryStream gridStream = new MemoryStream(); view.SaveLayoutToStream(gridStream, OptionsLayoutBase.FullLayout); gridStream.Position = 0; using (StreamReader reader = new StreamReader(gridStream)) { return reader.ReadToEnd(); } } public static void RestoreLayoutFromString(this GridView view, string layout) { if (!string.IsNullOrWhiteSpace(layout)) { using (MemoryStream stream = new MemoryStream(Encoding.Unicode.GetBytes(layout))) { stream.Position = 0; view.RestoreLayoutFromStream(stream, OptionsLayoutBase.FullLayout); } } }
Enum + Grid + Images = Headache
I have an enum for the podcast state and rather than show the text, which is the default, I want to show an image on the cell. However this is not the easiest thing to figure out since there is no designer support for this However you can do most of this in the designer and then only need one line of code per enum value .
Step 1
Set the Column Edit property of the column to an ImageComboxBoxEdit:
Step 2
On the ImageComboBoxEdit editor settings set the small images (and/or large images) property to the image list which contains the items you want to show.
It is important that you know the position (or index) of image in the image list.
Step 3
Now all you need to do is add the item values for the editor in code using the Items.Add method, which takes an ImageComboBoxItem. That class has some overloads which accept an Object for the value and here you can put in the enum value. Once this is done it all works fantastically.
You’ll note in the demo code below that I have an image index of –1 for the first item, this is so that no image is shown!
editor.Items.Add(new ImageComboBoxItem("None", PodcastState.None, -1)); editor.Items.Add(new ImageComboBoxItem("Downloading", PodcastState.Downloading, 0)); editor.Items.Add(new ImageComboBoxItem("Pending", PodcastState.Pending, 1)); editor.Items.Add(new ImageComboBoxItem("New Episodes", PodcastState.NewEpisodes, 3)); editor.Items.Add(new ImageComboBoxItem("Error", PodcastState.Error, 2));
Visual Studio Service Pack 1 - Beta: Field Guide
Brian Harry announced the availability of the service pack 1 beta which is fantastic news for all developers. This post is a field guide of me doing the installs.
Before that I wanted to point out a few key things included in this SP:
- This can installed in production – this beta includes a “go live” license so it is supported and upgrades to the RTM of the SP will be supported.
- This includes over 80 hotfixes for between 800 and 1000 bugs and many new features. For a full list see the link above, but here is a brief list:
- Silverlight 4 tool support!
- Unit testing can target the 3.5 framework now.
- IntelliTrace support for 64bit and SharePoint!
- Performance Wizard for Silverlight!
- HTML 5 support
- IIS Express support
- SQL Compact Edition 4 Tooling
Details on the last three can be found on Hanselman’s blog.
- Some third party systems may break with this, at this time known ones are:
- ASP.NET MVC 3 RC 1 – this will be fixed in the next update.
- Visual Studio Async CTP – this will break completely! No news, yet, on when it will be fixed.
The Process
For me there are three files you need to get:
- Update for .NET 4
- Update for Visual Studio
- Update for Team Foundation Server (not covered in this post)
Step 1
Install the .NET 4 update first – this took on my machine 24 minutes to do. It is important to note that I did shutdown Visual Studio first but I had some other applications open, including Pull which is .NET 4.
At the end of the process I needed to restart!
This step is no specifically needed as the VS SP will include this automatically, however I personally like the idea of doing it manually and making sure .NET 4 apps continue to work before I continue to the VS install.
Step 2
On to the Visual Studio install which after a few minutes tells you what will be updated and then, tells you that it wants to download 490Mb!
What I had done was to download the smaller installer version (less than 1Mb) which means it first figures out what is needed and then downloads the rest. This is great for some people as the download size is less, however since I live in South Africa (read: bandwidth is a luxury) and I work with 300+ other developers it is better for me to get the “DVD” labelled one which is bigger (in my case 103Mb bigger) but contains everything in one go so it can be shared easily and the bandwidth hit just once!
Step 3
We re-join the action a while later (when the “DVD” edition downloaded, approx. 1 hour 21 min later) we start process again and this time the download size is 0Mb
This took 29 min to process (remember this is without the download) this install and success!
Notes
I haven’t found anything in the many extensions I use daily that has broken! In particular my favourites all work
- CodeRush still working!
- Ghost Doc 2.5 still works.
- I did have one of the help extensions installed and VS just handled that fine (ie.e. no conflict with the new help viewer).
- SQLite development tools
- Power Command for VS
- Pro Power Tools for VS
- WoVS Quick Add Reference
Upgrade to SharePoint 2010 on Small Business Server: Field Guide
Recently I needed to do an upgrade from SharePoint 2007, to be exact WSS 3.0, to SharePoint 2010 – “No big deal” I thought, “I’ve done it before”. Assumptions, they do make for interesting life experiences, because this was something different – this was an upgrade on a Small Business Server (SBS) deployment.
For those who do not know, SBS is a lightweight all in one server product. So when you install it you get Windows Server 2008, plus Exchange Server, plus ISA, plus SharePoint, plus plus plus – ALL PRE-CONFIGURED! It is fantastic to use in small companies.
Microsoft has produced a fantastic upgrade guide for this very scenario: http://technet.microsoft.com/en-us/library/ff959273(WS.10).aspx but I think is missing a few footnotes of things I found during my upgrades, which this blog post aims to share.
Check Lists
I’ve made two check lists of things you should do ahead of time:
Software
This is the software that you will need during the upgrade.
- SharePoint 2010 Foundation Installation Media - http://go.microsoft.com/fwlink/?LinkId=191959
- SQL Server 2008 R2 Express with Advanced Services x64 - http://go.microsoft.com/?linkid=9729749
- SBS Update rollup 4 (from Step 14) – Download details can be found in the Microsoft Guide
- WSS Service Pack 2 x64 - http://go.microsoft.com/fwlink/?LinkID=196490
- .NET Framework 3.5 SP 1 - http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe
Environment
This is some prep for the environment you can do a head of time.
- Get a service account created on the domain for SharePoint to use.
- Get a service account created on the domain for SQL 2008 R2 to use as it can’t use network service on a domain controller.
- Check if there is a public internet FQDN setup and get the details of that, will need this when setting up the AAM.
- Get domain name used for email.
- Check for a local domain name for the site, normally companyweb. Verify this can be access on the server and also from a workstation on the network.
- Make sure it is a domain controller – there is some scenarios where you are not installing on a domain controller but it is SBS in which case a lot of the guide and process will be broken.
Notes
Here are my additional notes for the guide. For some steps I have no notes because there was nothing extra special about those processes that needed noting.
Step 1
- It is easier to check the version number in add/remove programs by showing the version number column. Service Pack 2 has a version number of 12.0.0.6421 so we want that or higher.
- Alternatively turn on show updates in add/remove programs and see if SP 2 is installed.
Step 4
- It is not important to disable the service during the copy, provided your server will not be rebooted during step 4 and no one is accessing the SharePoint site.
- It is VITAL to place these files in a backup location and then copy the content database files MDF/LDF to a secondary location. This location is where the database files will be used from in future.
- Make sure the database files are NOT read only.
Step 6
- It is a complete farm install, not a stand alone farm install
Step 7
- It is ok for the site not to exist
Step 8
- If the Central Admin “Getting Started Wizard” pop’s up, it is ok to cancel it wizard
- Make sure the app pool is set to Network Service
Step 13
- If you get a Default Web Error it is because the default and intranet names are the same – make sure they are not.
Additional steps post upgrade
- Log on to the site and do the visual upgrade (Site settings -> Title, Description & Icon -> Update the user interface), else it looks like you did no work!
- Check the content database is setup with a timer and search server.
- BACKUPS! http://technet.microsoft.com/en-us/library/ee428295.aspx
- If search is broken check for the loopback issue from WSSv3, however this should be resolved by the SBS rollup that was installed: http://blogs.technet.com/b/sbs/archive/2009/05/07/event-2436-for-sharepoint-services-3-search.aspx
Pull December 2010 Release
Another month, another Pull release This month is not a very feature rich release, but includes some vital features and new ideas:
New Parsing Engine
Internally in Pull, we have added a new parsing engine which now handles feeds which are broken. The scenarios we are catering for:
- Putting incorrectly encoded content in the description. Ted Talks I’m looking at you.
- Using DTD’s with the feed. Let’s Talk Geek podcast used to break because of this.
- Incorrect date and time formats. 702 podcast are an example of this.
What this means to you as a consumer of podcasts, is that more are podcasts available for you to subscribe to now!
Battery Support
If you are on batteries (i.e. laptops not plugged in) downloading can put a big strain on the batteries, so we now have a way to prevent downloads while on batteries. This can be controlled in the settings dialog.
Online Detection
There is no point even trying to download if you are not online (waste of CPU, memory, batteries etc…), so we now ask Windows if you are online and then only if download if you are online. This too can be controlled in the settings dialog for scenarios where you are online but Windows is unable to detect it.
Better Hardware Use
We optimise how many downloads you can do based on the number of CPU cores available, this ensures we download optimally based on the limits of the CPU. This can be adjusted in the settings.
Sync Support
We new have a very basic sync system in Pull, which allows you to easy sync your devices with your downloaded episodes. This is intentionally basic for this release as we try to understand the needs and wants of people who use this. Please provide feedback on this feature.
Twitter Support
Another new feature is a one click way to share using Twitter what podcasts and episodes you are listening to! This is very basic too in this release and can break in some situations. We will be working on this and it will be enhanced in the January release.
Minor Features
- Improvements to the UI and theming
- Better last resort crash support
Looking Forward
For the January release we will be implementing some major new features:
- Grid overhaul – we make use of grids to list your podcasts, episodes, downloads and the log. In January we will be giving them a major overhaul and give you the ability to have filtering and searching, persistent customisations and performance improvements.
- UI Enhancements – Really working hard on making the UI easier to understand while giving power users more control.
- Twitter – Better support for Twitter, including using bit.ly for shortening.
Little taste of the current development progress:
CommNight December - Some interesting events
In the middle of the company parties, you should take one night off to do some fantastic learning and networking at CommNight (Community Night) on the 14th December! You can read about all the details on the Microsoft DPE Blog.
There are two groups which I want to highlight which will be at CommNight:
S.A. Developer
S.A. Developer is a user group for developers and in December will be hosting the following topics:
- Tool of the month: This short (10min to 15min) session is where someone can present their favourite developer focus tool or add-on.
- Unit Testing WPF & Silverlight – Tools & Techniques: Silverlight and WPF can be used to create truly immersive UI experiences for users. Testing these UI components and the logic around it can become complex – especially when using frameworks like PRISM. Join us in this session as we take a look at a few tools and techniques that can be used when unit testing WPF and Silverlight applications.
Really looking forward to this session!
Information Worker
Information Worker is a user group for those in the IW space, not just developers but everyone even people who job just involves Excel and Outlook! This month we are looking at:
- Lync – Microsoft’s Unified Communication System
- Windows Phone 7 – What does this give the IW user? Things like Office and SharePoint integration will be discussed