Friday, December 16, 2011

To use Report Builder, you must install .NET Framework 3.5 on this computer!?!?!

I ran into a weird issue today in Sql Server Reporting Service 2008 R2 and wanted to share in case you run into this too.  Here is the back story:

 
I installed SSRS 2008 R2 on Windows Server 2008 R2 and was trying to create a report using Report Builder from the SSRS web interface.  When I clicked on the "Report Builder" menu item, I got this error:

 
To use Report Builder, you must install .NET Framework 3.5 on this computer.  To visit the Microsoft Download Center and install .NET Framework 3.5, click install.
 
Now, I know that the .NET Framework 3.5 is installed on Windows Server 2008 R2 by default; but who knows, maybe something was wrong with my installation.  So, before I clicked on Install, I figured I'd check to see that I actually have the framework feature enabled (who knows, maybe I really screwed something up).  

 
So, opening the Server Manager and going to the Add Features screen, I see the following:
Hmm, the framework is installed and enabled.  Alright, maybe something got screwed up somehow.  So, I click on the "Install" button.  It takes me to the download site and the .NET Framework 3.5 is downloaded.  I run the installer and get:
Ok, I've come full circle here.  This is awesome.

 
At this point, remembering that someone else probably has already experienced this same issue, I head out to the interwebs ;).  Lo and behold, someone has experienced this besides me, and they posted a solution to my immediate problem.  Wonderful!  So, for the time being, I make the necessary changes that they offer up, and voila!  Report Builder 3.0 works now when I click on the link. 
If you are in a pinch and want to know the temporary work around to fix the problem, here's the link that I reference above:  http://preview.tinyurl.com/78zqdau .  And just in case that link is no longer valid, here is what the author recommended:
  • In IE9, Go to the Tools menu, and click F12 Developer Tools.
  • This will bring up this window at the bottom of the browser:

 
  • Click on Browser Mode:  IE9, and then select:  Internet Explorer 8
  • Now, when you click on the Report Builder link, it works.
But, being curious and not being satisfied with just "how" do I fix the problem, I want to know "why" was there a problem in the first place?  So, that's what this post is about:  understanding the problem in case I see something like this again I can fix it. 

Debugging Details:
Ok, so I enlisted some help from friends:  Fiddler, .NET Reflector, SSRS Logging, and Adam Tuliper.  [Yes, one of those is not a tool].

The first thing that I wanted to do was see if there was anything in the SSRS Log file that may provide some additional information.  So, I set the logging level to verbose on SSRS.  This is done by modifying the following file:  C:\Program Files\Microsoft SQL Server\MSRS10_50.YOUR_INSTANCE_NAME\Reporting Services\ReportServer\bin\ReportingServicesService.exe.config. 

Specifically, set the following values to a value of 4 (which is verbose):
  • DefaultTraceSwitch - set it to:  "4"
  • RSTrace\Components - set it to:  "all:4"
The following screenshot shows the section of the config file that contains these nodes:
After I set the loggin level to verbose, I then loaded the Folder.aspx page in both modes (IE8 and IE9).  I saved the logs from each run into separate files and compared the files with my favorite comparison tool.  This showed me the following:

In IE8 mode:

In IE9 mode:
So, in IE9 mode, there was additional logging information about a .NET assembly.  Sadly, there was no explicit error or anything that would tell me exactly why the difference in the log entries.  But, we had something to go on:  differences in the log entries can tell you much.  And what this tells us is that SSRS emitted additional logging about loading a .NET assembly under IE9 mode vs IE8 mode.

Enter Fiddler and Adam:
At this point, I turned to Fiddler and Adam.  I performed the same tests with Fiddler that I performed earlier with the SSRS logging.  I loaded up Fiddler and then loaded the page under both modes, and then compared the results of both.  Since the log sort of pointed us to a .NET assembly, Adam asked me to look at the User Agent in the requests.  So, here are the two requests:

IE8 Mode:

IE9 Mode:
Ah ha!!!  The USer Agent is the difference between the two modes.  So, our thoughts are that the Folders.aspx page in SSRS is looking at the header to detect whether or not the .NET Framework is installed.  And since in IE9 Mode it cannot find the ".NET CLR 3.5" entry it assumes that the framework is not installed. 

So, this brought us to this page from Microsoft regarding IE9 User Agent changes:
http://blogs.msdn.com/b/ie/archive/2010/03/23/introducing-ie9-s-user-agent-string.aspx

Here is some text from this link:
"An important change for site developers to know is that IE9 will send the short UA string by default."
And more importantly:
Well, that solves that mystery.  This is definitely something that I'll keep in mind in the future when using IE9.  I'm glad that I dug into this more than just accepting a simple work around that I found on the internet.  I hope this helps someone else that not only wants to know the work around, but also the "WHY?" and fully understand the solution. 

I look forward to your comments and thoughts.

Tim

1 comment: