Archive for January, 2008

Filed Under (Events) by Chris Weldon on 16-01-2008

As I had mentioned I was going to do a little bit ago, I have converted my blog from Serendipity to Wordpress. I find it easier to use, easier to configure, etc. In any case, I apologize for the way it looks, but give me a bit of time and I’ll have a nice style applied to it.



Filed Under (Coding, Windows) by Chris Weldon on 04-01-2008

Background

Well, as many of you have known, I’ve been working on projects that involve the dark side - that being Microsoft projects. Yes, this means I’ve been working on .Net applications in both Visual Basic and C#. The C# applications are kinda fun to work with, but I still maintain that VB is a ridiculous language, despite the fact that both VB and C# compile to the same intermediate code.

In any case, I’ve been working on a legacy application that uses Crystal Reports to handle it’s reporting. For anyone looking for an opinion on Crystal Reports - don’t get it and don’t even think about touching it with a 10 foot pole. It’s nasty, bulky, and extremely difficult to install and configure with applications appropriately. This is the whole purpose of this post.

Environment

This application is being run on a Windows Server 2003 w/ Service Pack 2 server behind a firewall accessible only through VPN. Visual Studio .Net and Crystal Reports 8 and 10 are installed on the server (read below why this is, I won’t explain here). This project has no project or solution file, as it was written in 2003 and the developer in-charge had a certain way of running projects for the web, which was not the most ideal. Needless to say, he’s no longer with the group. :-D

The Problem

When trying to run the application, I get the following nice 500 level error message from IIS:

Server Error in '/' Application.
Cannot find KeycodeV2.dll, or invalid keycode.
Description: An unhandled exception occurred during the execution 
of the current web request. Please review the stack trace for more 
information about the error and where it originated in the code.
 
Exception Details: CrystalDecisions.CrystalReports.Engine.InternalException: 
Cannot find KeycodeV2.dll, or invalid keycode.

Fun. So, I spent about 4 hours yesterday and an hour this morning looking up what the possible answer could be. One of the first things I see on Google is people mentioning the addition of certain Merge Modules to the solution for the project. Such an example can be found on the vbCity/devCity.Net Forums. However, this solution doesn’t apply in my case because of the following reasons:

  1. We aren’t using solution files.
  2. I’ve never seen any merge module packages installed or added to any part of the large project.
  3. We aren’t “deploying” the application, but rather are putting it on a server that is setup like the developer workstation, ie: Visual Studio .Net (2002) is installed, the developer edition of Crystal Reports 8 and 10 are installed.

Please refrain from making comments regarding all of the atrocities listed above. I understand that this project is awry and should be scrapped, remade, yadda yadda. However, I have voiced these concerns to the appropriate individuals and we have to get approval from our customer before proceeding with said fix.

So, what other possible solutions for this problem could exist, I wonder? More Googling yields a potentially worthwhile solution which requires access to the registry. That’s fine with me, as I’m used to working in the registry. This BusinessObjects Knowledgebase article stated that I need to modify the following 2 registry keys and give access to the user that ASP.NET is running as. The keys are:

  • HKEY_CLASSES_ROOT\Interface\{4A4D268A-DF9B-4FC1-8301-D9FEEEF69F9C}
  • HKEY_CLASSES_ROOT\TypeLib\{8D43D0B9-C14E-4577-9E67-A9A1EEF82302}

When I gave the ASP.NET user read access to the files, I then reloaded the page and got the same error message. Reading the article further revealed that I had to register the keycodev2.dll file via regsvr32. Well, upon issuing the following command:

Regsvr32 "C:\Program Files\Common Files\Crystal Decisions\1.0\bin\keycodev2.dll"

I get the following error message:

DllRegisterServer in 
C:\Program Files\Common Files\Crystal Decisions\1.0\bin\keycodev2.dll failed. 
Return code was: 0x8002801c

The knowledgebase article then stated that I needed to look at another Knowledgebase Article which turned out to be total nonsense. So, back to Google.

I then found this absolutely brilliant article that discussed a potential solution to the error listed above. However, this sent me jumping through hoops to try to look at the dependencies of the keycodev2.dll file and then try to monitor the registry entries that were being hit, only to reveal no such luck. So, I continued looking for another solution online and found yet another Knowledgebase article that discussed a fix when deploying a Crystal Reports application. This didn’t resolve or even come close to the overall issue, but I finally found a PDF article that was right up the alley of what I was trying to do, especially in terms of hosting the application. Unfortunately, it contained the same bit of information that the first knowledgebase article had in it. But, there was something in the article that made me realize what the problem was - access to the registry.

Potential Solution

I had known this entire time that my user account had Administrative privileges. Unfortunately, Administrative privileges doesn’t always mean that everything is readable and writable by the Administrator. Sure enough, when I looked back at those registry keys listed above, neither had even read access for the Administrator. I quickly gave the Administrator account Full Control and made sure it permeated to all subkeys under each of those keys listed above. I reran the regsvr32 command listed above and v’oila! The DLL registered successfully!



Filed Under (Events, Random Rants) by Chris Weldon on 03-01-2008

Well, it’s been nearly a full 2 months since my last entry. Obviously, I’ve been a bit busy. I’m sure my friends would like to hear about what I’ve been up to, so here’s a couple of month’s worth of information in one post.

School

November and December were rough months in terms of school. Lots of things all around me started piling up at once. In particular, a project went horribly awry at work (Cleopatra, for those who are familiar with this project) requiring me to jump on board and spend a complete weekend from dawn to dusk working on unit tests. This was shortly after the whole Phoenix, AZ impromptu trip that I needed to make (read my last post to understand what’s been going on here). After this, the College of Architecture project really started ramping up and demanding a lot of my attention, which caused me to pull a lot of extra hours that I wasn’t planning on spending.

Past this, final school test preparations and studying was in order. Unfortunately, I didn’t spend nearly as much time as I would have liked this semester studying for my classes. My math class got the worst treatment of all, which essentially was me ignoring the homework most of the time and then cramming about a week before the test. This went well for the first test, as I made a 73, about 5 points above average on the exam. However, the second test didn’t go very well at all but was more because the professor was being _very_ in terms of how he wanted answers formatted. This caused me to get a 58 on my second exam, which really concerned me because I got my grade about a week before finals. The final exam went better than I thought it was supposed to go, but my final grade was not indicative of this. I received a D in the course, which means I have to take it over again.

However, the positive side was that I thought I was going to get a horrible grade in my ECEN325 course, and turned out with a much better grade than expected: a B. This is not bad considering I was sitting well below the standard deviation of students before the final. So, I don’t have to worry about retaking that course. The only thing I have to worry about is the 3 foot mount of paper that’s sitting on my office floor. This is no joke: I have a 3 foot stack of paper on the floor from this class _alone_. And Melissa says essays kill trees- classes in general kill them.

CIS

Most of the winter when work was in session I have been busy working on the College of Architecture web site. Many of you probably don’t notice a difference in it right now, but that’s because there isn’t any publically viewable differences. Instead, it’s all how it processes files on the backend and what new tools are now available from the backend. The problem with this was we didn’t write the backend system - it was a developer that was forced from his position unwillingly. So, rather than him leaving a nice plethora of documentation behind for his application, he left with telling me as much as he possibly could with the application and I was expected to learn how it operates and figure out any problems with it. When we tried to deploy it the first time, I ran into numerous unexpected errors and problems which forced us to abort the deployment. Instead, I spent a couple of 50 hour weeks trying to figure out what was necessary to be able to get the application ready for launch. Once that had been determined, I spent a lot of time both documenting the system and fixing what was missing or broken.