Archive for the ‘Windows’ Category

Filed Under (Coding, Linux/Unix/FreeBSD, Windows) by Chris Weldon on 01-04-2008

A friend of mine passed over the following blog entry, which I found quite to my liking. J.P. Boodhoo (a leader in the .Net development community) has found some plugins and tools which enable vim in certain applications in Windows. Those being:

  • Visual Studio 2005/2008
  • Microsoft Word
  • Microsoft Outlook

Check out the article. It’s awesome.



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 (Coding, Windows) by Chris Weldon on 03-10-2007

This was a problem I had while trying to send email from my local workstation through a web application. The script would execute fine, but I wouldn’t receive any email. Upon further investigation (which included walking through a debugging session to find out what was going wrong), I came across an exception when trying to use:

SmtpMail.Send(email)

The exception that was thrown have the following error message:

**The message could not be sent to the SMTP server. The transport error code
was 0x800ccc15. The server response was not available **

After a couple of minutes of realizing that I was not using localhost as my SMTP server, I figured there was either a problem with my mail relay, or something wrong with my workstation. A couple of Google hits returned that the problem was a VirusScanner issue. Sure enough, when I took a look at my Access Protection settings in McAfee VirusScan Enterprise 8.0i, one of the ports that was being blocked from sending traffic was port 25. There were 3 possibilities that I could have taken to resolve this:

  • Disable port 25 blocking
  • Delete the port 25 block rule
  • Add both aspnet_wp.exe and w3wp.exe to the exclusion list.

All three of these solutions worked for about 5 minutes and allowed email to be sent through my application. However, after that 5 minute period, the rules were restored. I’m not entirely certain why they were restored despite my making sure that they were saved and took immediately after closing the VirusScan Console, but I’m in the process of figuring that problem out.



Filed Under (Windows) by Chris Weldon on 14-05-2007

Of all the things Microsoft can do, this has got to be the lowest of the low. Read the story on CNN Money.

Essentially, Microsoft is gearing up for the biggest series of law suits since SCO made their ridiculous claims. Who’s going to be the target? The Open Source community. Microsoft is about to open a can of worms against a group of individuals who’s significantly more expansive and quite a bit more populous than their own company. And why? For money. As if the company doesn’t make enough money on their own, they’ve decided to be greedy and go out to fight other products that cost…nothing? That’s right, Microsoft is wanting to sue (get this) the USERS of software that compete against their patents - not the WRITERS of these pieces of software. Essentially, that’s the same things as suing everyone in America for eating a patented hot dog. Absurdity wreaks from Microsoft’s claims.

Not only is Microsoft getting ready to sue these USERS of software, but they’re doing it over FREE products. So, this turns out to be the same situation as a bread manufacturing company suing everyone in the world on the grounds that Jane Doe made her bread from scratch instead of buying the bread manufacturing companies bread. Again, absurdity.

Once again, situations like this really make me hope that Microsoft begins disintegrating due to government hooplah and pushes to use open source software rather than the greedy poorly-constructed giant’s software.



Filed Under (Coding, Linux/Unix/FreeBSD, Networking, PHP, Windows) by Chris Weldon on 24-04-2007

I’m here in Austin, TX today at the SANS: Web Application Security Workshop (I was also here yesterday, too). I hope to be able to provide an accurate review for this nearly worthless workshop that many of us from CIS Customer Applications are attending. There are a couple of individuals who believe that the information being taught here is somewhat worthwhile, but most of us from the group either know everything that’s been taught so far, or find some of the information being taught doesn’t relate to us.

For a quick synopsis, here’s what I would have to say: If you are a intermediate or experienced developer, you will be absolutely bored with this workshop. If you are an executive who has not much technical know-how, but want to learn about security for your web applications, this is a worthwhile program for you to attend. Be aware, however, because there are some things that executives don’t need to (or don’t care to) learn about in this. Regardless, this is the most watered down version of a so-called technical workshop I’ve ever been through. Read on to find out how ridiculous some of the things we learned were.

Read the rest of this entry »



Filed Under (Windows) by Chris Weldon on 13-06-2006

Well, I’m officially demoing Windows Vista Beta 2 and it was a serious pain to install on VMWare 5.0. For starters, when I initially finished the installation, there were not graphics drivers loaded, so it used its standard, which maxes out at 800×600 and 4-bit resolution - talk about yucky. Also, there were several other drivers missing, including ethernet, sound, and the aforementioned video drivers.

SOLUTION:
I tried installing the VMWare tools set, but had problems. I found a website online (access it here) that talked about a workaround, only to figure out the reason the tools were not installing were because I had a CD in my drive already. Aparrently, VMWare loads a CD into the drive if you try to install VMWare Tools, but if there’s already a CD in your physical drive (or if you have an ISO loaded), then it doesn’t start the installation. So, after I removed the CD from the drive and verified that I wasn’t using an ISO, I shut down Vista, closed VMWare, then started the entire thing back up again. Once I logged in and closed all extraneous windows, I finally was able to get the drivers installed and batabing bataboom - the usual Windows interface we’re so used to.

Anti-Virus for Vista:
Now I’m currently installing antivirus. McAfee doesn’t have a solution available yet, but Trend Micro has partnered with Microsoft to provide BETA Virus Scan software, though I’m not too terribly concerned about viruses since this is supposed to be a new codeset and invulnerable to many viruses on the internet today - we’ll see how well that holds up. The download for the Trend Micro BETA can be found here.

Graphically, Vista seems very nice. I had originally thought that it was going to mock MacOS X, but it rather seems to have new eye candy while maintaining the original Windows XP look and feel. One of the things that is kind of upsetting me is that many of the usual properties tags have been renamed to things like ‘Personalize’, which throws me off. The configuration panels have all changed, but getting used to the new panels for a techy like me is not that hard at all.

I’ll add more to this entry whenever I’ve had more of a chance to demo it.

Read the rest of this entry »