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

Tuesday, December 6, 2011

Part 1 - Integrating SharePoint Foundation 2010 and SSRS 2008 R2

[NOTE:  Ok, finally I have some time to polish up this post and get it published on my blog.  Sorry for the delay but work and family life has kept me very busy the past few months].

Part 1 of this series will focus on integrating SharePoint Foundation 2010 with SQL Server Reporting Services 2008 R2.  Why SharePoint Foundation 2010 and not SharePoint Server 2010?  Wel, three reason really: 

  1. Cost - it is "FREE"!!!  You can't get much cheaper than that.  :)  Of course, there are other things that you must purchase, like hardware, OS licenses, an Internet Connector license, etc.  But, the cost of SharePoint Foundation Server itself is free.  Now, if you do a simple Bing search, you'll be able to find a few ISP's that will provide a SharePoint environment for you, for a monthly fee. 
  2. I love a challenge - Sure, I can probably have a better Business Intelligence experience right out of the box with SharePoint Server 2010 and all of the features that are offered with it, but I really like a challenge.
  3. How Far Can I go? - Lastly, I just want to see what sort of Business Intelligence story I can put together using SharePoint Foundation Server 2010 and a little bit of work.  Can I pull off a "dashboard" that could rival something in SharePoint Server 2010?

Where to get SharePoint Foundation?
So, getting started with SharePoint Foundation was pretty simple.  With an MSDN subscription and the right download URL's you'll be good to go in no time.  First, you'll need to download SharePoint Foundation 2010 from this link:  http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5970

My environment:
For this series, I am going to use the following hardware / software:
  • Development machine - Dell XPS17, 2.5gHz quad core, 16GB ram, 256GB SSD internal and 500GB internal 7200 HD, Windows 7 64 bit.  This laptop is sufficient to run up to four virtual machines.
  • VMWare Workstation - I am using VMWare Workstation 8.0, but you could really use any software that you are most comfortable with.  I've used others, and I prefer VMWare Workstation.
  • Virtual Server - like I mentioned above, I am going to create a single virtual machine with Windows Server 2008 R2 to contain both SharePoint Foundation 2010 and Sql Server 2008 R2 instances.  This may not reflect the same sort of environment that you are looking to setup, but it is a start and hopefully will get you going and then you can take it from there.  [NOTE:  I will be putting together a multiserver example of SPF 2010 / SSRS 2008 R2 integration in a later blog series.]
Server setup / installation:
I don't want to reinvent the wheel or try to paraphrase from any of the existing sources on the web that cover installing Win2k8 R2 and SPF and SSRS; especially when these resources are so well written.  So, shown below are the high level steps and corresponding links that cover each step.  This will get you setup with a good Win2k8 R2 VM with SPF / SSRS integration.  If any questions arise while you are following through these, please add them to the comments section and I'll do my best to provide answers / guidance.
  • Setting up a BASE VM Server image -
  • Cloning your machine -
    • Description - This is just a note to remind you to make a copy of the VM that you created in the previous step.  There are resources in the help section of VMWare Workstation that will help you through this, but here are the steps:
      • In VMWare Workstation right click on the VM that you just created and select:  Manage - Clone, then follow the wizard:
      • Clone From:  The current state in the virtual machine
      • Clone Type:  Create a full clone
      • Virtual Machine Name:  SharePoint Foundation - SSRS Dev [Feel free to use whatever name you want for this option.]
      • Virtual Machine location:  I store my VM's on an external USB 3.0 drive housing, but select the location where you store your VM's.
      • Click Close.  The wizard will now clone the BASE VM that we just created.  For the rest of this blog series, we'll use this cloned VM not the BASE VM.
  • Server Roles -
    • Open the Server Manager tool, and then click on Roles.
    • Click on Add Roles
    • Add in the Web Server role and the Application Server role.
  • Configuring the Server to be a domain controller -
  • Installing SPF and SSRS on the VM -
    • Description - The following Microsoft TechNet and MSDN articles explain how to install SharePoint Foundation (SPF) and Sql Server Reporting Services (SSRS) on the same server.  Follow these links below in this order:
  • Report Services Add-in installation -
  • Configuring Report Server integration in SPF -
  • Activating Report Server -
Ok, at this point,you should have a virtual server setup and running and ready to move on to the next part which gets into the meat of this blog series for creating a report dashboard with SPF 2010 and SSRS 2008 R2.


SSRS / SharePoint Foundation Integration

Ok, it's been a while, but I am ready to begin the blog series on integrating SSRS 2008 R2 and SharePoint Foundation Server 2010.  I'll try to get the entries out on a weekly basis, but in the meantime, if there is anything in particular that anyone would like to see an example of, or if there is anything that you have questions on, let me know and I'll put up some one off posts to answer any questions that you may have with your SSRS / SPS integration or project.

Tim

Tuesday, May 24, 2011

TechEd North America 2011

TechEd this year was great!  The sessions that I attended were all very worthwhile.  The ones that I missed, I'll catch on Channel 9.  I was able to volunteer for a few things this year as well.  Volunteering at the event is definitely worthwhile because you can help out, and it puts you in a position to network with many more people outside of your normal track at the conference.

One of my very good friends, Adam Tuliper, presented this year at TechEd.  He did a great job, and his presentation is one that every developer should view and learn from.  It covered a topic that most developers (and sadly, me too) overlook or put off until the "functionality" of the project is completed.  The presentation is on "hack proofing" your ASP.NET web forms and MVC websites.  You can watch the recording here:  http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/DEV333.  Like I said, you definitely will learn a lot about security. 

If you get the chance to see Adam present at a CodeCamp or User Group in your area, it is definitely worth the price of admission.  :)

Tim

Isolated Storage development in Windows Phone

Tonight I was racking my brain trying to get a json serialized file from the isolated storage of the emulator while I was debugging.  This tool is a god send and will help you to inspect the files that you create in the isolated storage of your development environment, it is named:  Windows Phone 7 Isolated Storage Explorer.  It can be found here:  http://wp7explorer.codeplex.com/.  There were a few quirky things, but it did exactly what I needed which was to let me inspect the files that I put into the isolated storage area.  I hope this post helps someone save some time.

For those that are interested...

I retrieved several DataServiceCollections from an odata feed, converted them to an ObservableCollection and then serialized it out to the Isolated Storage using the
DataContractJsonSerializer  and the IsolatedStorageFileStream.  This was all so that I could include this data with my application as a resource.  This was necessary since the odata service is not guaranteed to stay up much longer, and the data is not going to change.

But, with the help of the WP7Explorer, I was able to get the json serialized files and now I can include them with my application, and within the App.xaml I can put these files to the Isolated Storage the first time my application starts up.

Tim

Thursday, April 21, 2011

Creating the Windows Phone app

Ok, with all of our tools installed, (and our phone unlocked - because we will run the app on the phone too) we can start to put together our app.  Fire up Visual Studio 2010.  Select File - New - Project.  Then select the "Windows Phone Panorama Application" template.  This template will give us a very nice base for our application.


Let's give our app a nice and meaningful name, something like:  MyPocketTechEd (since that is what we are creating:  an app that puts all of the up to the minute TechEd data in our pocket.).  Click Ok, and the shell of our app is created for us with the Panorama template.  Ensure that you selected "Windows Phone Emulator" as the target and then click F5. will bring up the emulator, and you'll see the panels that are contained within the template.  Our application should look like this for now:

You can scroll down, scroll to the second set of items, etc.  This is great, with very little effort on our part, we were able to create the basics for our app.

Coming next:  Changing styles, images, and text.  Then we'll be on to populating the app with data from the TechEd odata feeds.  I'll update this post with this next part as soon as I can (hopefully withing the next few days.)

Tim

TechEd scheduler for Windows Phone and Silverlight - Part 1

Ok, even though I want to create a really nice app using the Portable Class Library, MVVM Light, and other tools to be able to have my app accessible from multiple places, we have to start somewhere...so, I am starting with a plain old WinPhone 7 app that directly consumes the TechEd odata feed.  I'll then build this simple app out into something cooler in subsequent posts.  But, for now, let's start with the WinPhone7 app, and put the TechEd schedule on our phone...instead of on our lanyard.  :)

To get started on building the Windows Phone app to consume the TechEd North America 2011 odata feed, I installed the following:
Once you have those installed, you can move on to the steps below to see how each piece of the app was built:
  • Creating the Windows Phone app
  • Connecting to the odata feed to get our data for TechEd
  • Putting it all together
The above posts will get us to something useful for viewing all of the readonly feeds on speakers, tracks, presentations, etc.  But, we want to be able to create a smart schedule that we can follow when we are onsite.  And, if there's time, let's also add viewing some videos on our app too (from TechEd's past).  The following posts cover this added functionality:
  • Creating a smart scheduler
  • Adding in videos to our app

    TechEd North America 2011

    I will be at TechEd in Atlanta in May and am looking forward to meeting others that are interested in Windows Phone and XNA development.  I really enjoy going to TechEd to learn from what others in the industry are doing and to get access to the product teams from Microsoft.  My TechEd profile is public if you want to add me as a contact.

    Wednesday, April 13, 2011

    TechEd scheduler for Windows Phone and Silverlight

    I just started working on an app to setup my schedule of events at TechEd.  Instead of just creating a WinPhone app that calls into the TechEd odata feed directly and simply list out the speakers, events, sessions, etc.  I am creating an app using MVVM Lite and the Portable Class Library so that I can make the app available on the phone and within a Silverlight app.  The app will allow you to create your session schedule and, if time permits, I might add in some "social" aspects to the app as well to plan your "after session" fun.