You aren’t likely to see me post much about SSRS, mainly because I use it only on rare ocassions and when I don’t tend to hit blog-worthy things. Today is different though…
We recently deployed a new SSRS farm at the office. The deployment was smooth, the first reports went on without any issues. Everything looked good.
I was setting up a data driven subscription for a report and received the following error:
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster
What the heck?
Searching the web provided a plethora of hits around this, but they were all related to regular ASP.NET and there wasn’t anything in particular around SSRS and this problem.
After digging around I went back to Books Online and started digging through the documentation there with a fine tooth comb, and that’s where I found the solution (see it for yourself at http://msdn.microsoft.com/en-us/library/cc281307(SQL.105).aspx#ViewState )
Due to Reporting Services running in a load balanced configuration it couldn’t autogenerate the key used for validation for the view state. In this case a manual key had to be generated and deployed to each of the SSRS front ends.
I needed a resource to generate a key so I went out to http://aspnetresources.com/tools/machineKey where one click gave me what I needed.
<machineKey validationKey=”E764BC3B6B17235E6CC9B2C81FA1C2694D54FD8B47BE1E081AE50E3291FE731C392FD7E2B86DD9985498242BD82FBFC3AB53F78DC228E637089686AD3B6936D2″ decryptionKey=”FC20492987C969987BC88814BB264A4B8986074C0B3452F5DD81877F144D28DB” validation=”SHA1″ decryption=”AES” />
I then pasted the key into the ReportManager web.config file on each front end server. After a service restart everything came back up and I was able to deploy the subscription without any further issues.
Moral of the story here: Carefully read Books Online, it’s actually a great reference.