Tuesday, December 2, 2008

Fort Wayne SQL Server Presentation - Performance Monitoring and Baselining

Click here to download my FWPass presentation from November 25, 2008. The meeting was held upstairs at the Pint and Slice in downtown Fort Wayne, Indiana. The meeting format was a little different because someone apparently walked off with their VGA cable for the overhead projector. The backup plan was to use the big flat panel display, but my laptop didn't have S-Video output. In leiu of everyone peering over my shoulder at the laptop display, we just discussed the material. The atmosphere and food were great. It was a small informal group of six or seven, but it was still fun.

Sunday, November 2, 2008

IndyTechfest 2008 - Another Great Indy Event

The indytechfest 2008 was again a spectacular event. The logistics were even better this year than last year. The speaker lineup was excellent with an impressive thiry tracks. The organizing team (Brad Jones, Dave Leininger, John Magnabosco, Mark McClellan, and Bob Walker) managed once again to secure enough valuable sponsors to make this a free all-day event for the nearly 500 attendees. I believe over 800 registered in the first week after registration opened. There was even a delicious catered lunch and pletty of Swag and raffle items.

I attended the following events:
  • Session 1 - Business Intelligence Track: SQL Server Integration Services 2008 (Arie Jones)
  • Session 2 - DBA Track: How to Become a Profiler Master (Brad McGehee)
  • Lunch and Learn: Lessons on Event and Error Logging (David Leininger)
  • Session 4 - .NET Today: Developing with the Live Platform (Brian Gorbett)
  • Session 5 - Web Development with ASP.NET MVC (Aaron Lerch)

I look forward to the next indytechfest event... providing I can sign up before registration closes!

Monday, September 15, 2008

Visual Studio 2008 Multiple Projects in a Solution

Every time I attempted to create a single solution in Visual Studio 2008 with multiple projects, the Solution icon in the Solutions window disappeared after adding the first project. That resulted in my not being able to add additional projects by right clicking the top level solution icon. You can fix that easily by clicking Tools --> Options --> "Projects and Solutions" General property page and checking "Always show solution". I am not sure why the default was unchecked, but it was. I hope this tip helps people that might be confused by this behavior.

Wednesday, September 10, 2008

Where's my Cube? MSAS Deployment on Vista

In some ways I like Vista, but it sure seems like the learning curve on some development technologies is extended as a result. I seem to run into numerous things I need to track down and resolve that I wouldn't if I was developing on Server 2003 or XP. I created and deployed an Analysis Services cube... or at least I thought I did. The deployment wizard in VS 2005 indicated there were no errors and I was able to view the data in the VS browser, but when I opened Sql Server Management Studio (SSMS) and connected to my Analysis Services, my database and cube were not there.

After some experimentation and research, I realized I needed to right click and "run as Administrator" when I launched SSMS. When I did that, My cube magically appeared. Turns out Analysis Services uses the built in Windows User and Group functionality for security and the UAC puts a snag in it working as you might expect on Vista. Related url: http://msdn.microsoft.com/en-us/library/aa905868.aspx

After having administrative access to the Analysis Services database you can add an Admin or other Role in the "Roles" folder tree adding the logged in Windows user account then you can open SSMS normally without the "run as administrator" and you will be able to see and manipulate the database.

Monday, September 8, 2008

Add Reporting Services to Existing MSSQL 2005 Install on Vista

This week I attempted to add Reporting Services to an existing SQL Server 2005 installation. I was met with an error that IIS was not configured, so the checkbox to install the Reporting Services component was greyed out. I have been using IIS on this box for over a year so the install was obviously looking for some configuration flag or feature to be installed that was not. The first thing I did was verify that the IIS 6 Compatibility options were installed, which they were. I remember adding them a year ago for something else that required it.

I happened across another blog http://www.igregor.net/post/2008/01/Installing-SQL-Server-2005-Reporting-Service-on-IIS-7.aspx which showed the many required Windows features in the Control Panel -- Programs and Features -- "Turn Windows features on or off" section. The only one that was unchecked was under the Common HTTP Features. The HTTP Redirection feature was unchecked. I checked the checkbox and that allowed me to add the Reporting Services component to my SQL Server installation.

The installation is complete. I ran through the Reporting Services configuration tool and hit the http://localhost/reports page. Oops, error. Finally with the help of http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2834686&SiteID=17 Michael R. eluded to the removal of an extra backslash in the Handler Mapping which did resolve the issue. I don't know how he ever found that apparent typo that was configured by Reporting Services, but that solved the problem.

With the help of another handy blog, http://www.tlbignerd.com/2007/10/sql-server-2005-reporting-services-on.html, I got the properties to show up on the Reports page by temporarily turning off the UAC and adding a user with appropriate roles to the Report Services web configuration.

Friday, September 5, 2008

Server 2008 Ready for Prime Time?

My recent experience with Windows Server 2008 leaves me wondering if I am just unlucky with Windows latest operating systems or if it just isn't ready for production yet. Understand that my experience with Server 2K8 is on Virtual PC 2007 (for obvious reasons), not a production box. I attempted to start the OS and received nothing but a black screen after the Vista-like progress bar. After booting to Safe-Mode with Networking the OS booted once normally after configuring a set of updates. I attempted to install SQL Server 2008, but after installing the .Net Framework 3.5 SP1, my OS restarted and was booting to a black screen again, even in Safe Mode with Networking. I restarted in Safe Mode without Networking and it gave me an endless "Configuring updates: Stage 3 of 3 - 98% complete. Do not turn off your computer". Seriously, it doesn't end.

It looks like I will be back to the drawing board with Server 2008 to get it working again. Reminds me of my Vista SP1 experience.

Wednesday, August 27, 2008

Error from Goofy characters in SQL Connection string

I recently deployed a test app to one of our remote servers. I used an Ampersand (&) symbol in the SQL Server password to increase the password strength. When I replaced my development password for the remote server SQL Server password in the web.config, I was surprised by an ASP.Net Yellow Screen error. The error was not very descriptive because it indicated that I had the customErrors mode set to something other than "Off" (I was viewing the error from a Remote server). Actually, I did have customErrors mode="Off", but was still met with the same error. After making several other checks like Permissions on the web.config file, .Net Framework set to the correct Framework version, etc. I decided to open the web.config file using the IIS snap-in, which I almost never do. Fortunately the attempt was met with an error message indicating a syntax error in my web.config file which pointed directly to the Ampersand in my connection string password. Well that was a new one for me. Changed the password to replace the Ampersand with a different character and the problem was solved.

The moral of the story, if you keep getting the following Yellow Screen Runtime error from a Remote PC despite having customerrors mode="Off" set as indicated, you may have a syntax error in your web.config.



Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This customErrors tag should then have its "mode" attribute set to "Off".

Friday, June 20, 2008

VS2008 ASP.Net ReportViewer rendering issues after Vista SP1 Install

Background:
I was able to successfully create ASP.Net web forms in Visual Studio 2008 with Report Viewer controls to display Reporting data before installing Vista SP1 on my development box, possibly also before installing the Visual Studio 2008 Hotfix. After installing Vista SP1, when I tried to create a report, I received either no data at all in the Report Viewer control in the browser, or an error that read:

'document.getElementById(...).Controller' is null or not an object

I don't know if this was caused by the upgrade to Vista SP1 which supposedly sych'd the Server 2008 IIS codebase with Vista IIS codebase, but the fix required adding a Managed Handler to the Handler Mappings in IIS7 as found in the link below:

http://otkfounder.blogspot.com/2007/11/solving-reportviewer-rendering-issue-on.html

This resolved the problem and my reports rendered as expected. Many thanks to Antonio Ooi of OTK Web Solutions for the fix.

Friday, May 9, 2008

Page_Load called twice

I hate it when the IDE makes code changes that you aren't aware of that could have negative repercussions that you aren't aware of until after deployment to production. I recently upgraded an app from .Net 1.1 to .Net 2.0 and everything seemed fine. Testing showed my calculations were unaffected by the upgrade.

Somehow since then, one or more of my codebehind pages had an additional event added to the Page_Load method. The Handles clause was changed to "Handles Mybase.Load, Me.Load". This had the unfortunate side effect of calling the method twice. One of the methods called in the Page_load method summed some data, but the private member variable where the calculation was stored was initialized to zero outside of the Page_Load method. This caused the sum to be 2X the actual value because the data was summed twice.

When and how was this extra event added? I don't know, but I will be on the lookout for it in the future as it can cause unexpected behavior at the most inopportune time.

Tuesday, May 6, 2008

Vista SP1 Windows Update - hoses my Desktop

I wanted to upgrade my desktop from Business Edition to Ultimate SP1. I attempted to just run the upgrade, but it politely informed me that I needed to install SP1 on my Business Edition first. Well what sounded like a trivial routine task, ultimately rendered my Desktop completely unusable without an Operating System that would boot.
My desktop happened to show that SP1 had been downloaded via the Automatic Windows Update functionality, so all I needed to do was install. I let Windows do the SP1 install and at the end, it said that it was 100% complete. I shut down the PC for the night and the following day when it was restarted, it would not boot Vista in Normal Mode, Safe Mode, or otherwise. The OS decided that I had a "Missing or corrupt ntoskrnl.exe", please insert Vista DVD and repair the installation.
I figured, no problem, I will just run the repair routine which seems unusually common in Windows installations. Much to my dismay, I was presented with an error message to the effect of "This problem cannot be automatically repaired". That's it. Nothing else. Now what? Google, of course. Unfortunately there were thousands of blog posts with the same error message, but none of the suggested "hack" like fixes did any good on my system. Nothing of course from Microsoft.
Fortunately Microsoft is offering free tech support for SP1 issues. I never recieved any response from the contact form (supposedly 24 hour response time). I did get about 1 hour of time from a tech representative on the Chat line. Ultimately the best response I got was I need to completely reinstall Vista, all my programs and data. He did give me information on how to do the reinstall using the custom setting to retain a copy of my data, which was helpful information, but it won't save the 16+ hours it will take to reinstall all my installed programs.
I have not tested it, but there were many references from other upset users to use the 460 Mb standalone SP1 install instead of the poisoned Windows Update version.

Wednesday, April 16, 2008

Deploying VS 2008 projects using MicrosoftReportViewer

Caveats to using MicrosoftReportViewer control to create Client side Reports on a tightly controlled Production Server:
  1. ReportViewer dll's are not in the .Net 3.5 Framework Redistributable. They are in a Visual Studio 2008 Runtime Redistributable http://www.microsoft.com/downloads/details.aspx?familyid=CC96C246-61E5-4D9E-BB5F-416D75A1B9EF&displaylang=en (which says it is for XP and Vista). After installing the Redist on the Server (2K3 Enterprise Ed), the report displays, but it did a fine job of locking up my Browser every time I attempted to print the report. A Messagebox alert popped up with "Unable to load client print control" and the browser displayed the yellow bar at the top of the page wanting to install a SQL Server Add-in. Sure you could probably find the .dll's (listed below) , add a reference, and set Copy Local=true (although it didn't work for me for the Microsoft.ReportViewer.ProcessingObjectModel.dll); just make sure your Production server IT support staff approves. I did not test to see if that would resolve the previously mentioned browser lockups.
    • Microsoft.ReportViewer.WinForms.dll
    • Microsoft.ReportViewer.WebForms.dll
    • Microsoft.ReportViewer.Common.dll
    • Microsoft.ReportViewer.ProcessingObjectModel.dll
    • Publishing using the VS 2008 Publish functionality does not include the necessary dll's. Just because it says "publish only files it needs to run", doesn't mean it includes all the files needed to run. Of course you don't find out you are missing some of the dll's (like the Microsoft.ReportViewer.ProcessingObjectModel.dll) until you try to display the ReportViewer report. Make sure to include that step in your verification plan.

        Wednesday, January 9, 2008

        NUFW Presentation - .Net Role Based Security

        Last night I presented .Net Role Based Security (using the built-in Membership and Personalization provider model) for the Fort Wayne .Net User Group. Click Here to download the presentation and code samples. Armanda Turney added to the discussion the use of the SiteMap file with the enabling of security trimming to further programatically enhance the user experience by limiting the navigation menu options based on user roles. The .Net membership and personalization model provides a quick and easy method to add and customize membership and role based security in a way that is accessible even to beginner programmers.