October 2004 - Posts
Yep, I missed DevDays but it doesn't matter! Microsoft has made the Dev Days presentations available via the web. Also available is the IssueVision "smart client" application. IssueVision is the application that was developed for DevDays. Enjoy.
Here's something cool, Bible Player for your iPod. It contains an audio and the text of the scriptures. Currently, they only offer the King James Version but the Modern American Standard Version and Spanish Reina Valera versions are coming soon. Bible Player comes in a free version (text) and a deluxe version (audio & text) for $29. They even have a Bible Player news and tips blog. I don't think that my maxed out iPod mini can handle it but if you have a full blown iPod it might be worth a look.
Now Playing in iTunes: dc Talk - Jesus Freak
Chris Sells has gathered some nifty Windows Forms 2.0 samples. Some of the cooler ones are the Outlook 2003 Clone and MSN Messenger Clone.
Now Playing in iTunes: Fleming & John - Love Songs
I found a neat little plug-in called WMPTunelog that allows iTunes users the ability to add "Now Playing" information to their blog posts. It works by utilizing the same registry keys that WMP9 uses. The Newsgator .Text plug-in picks up the information and adds it to my posts. Cool.
Now Playing in iTunes: Pigeon John - Deception
A friend of mine just asked me the differences between XP Home and XP Pro. So here's the answer. In short, if you're a home user you should go with XP Home 95% of the time.
I stumbled across a
nice site for the 70-305 Developing and Implementing Web Applications with Microsoft Visual Basic .NET and Microsoft Visual Studio .NET. It takes the
preparation guide and matches it up with the proper Microsoft documentation. Nice.
I don't know why I'm running into all of these problems over the past week but here's another one. While debugging some ASP.Net code I reloaded my project in debug mode and I got smacked with a "Configuration Error". The error also specified a permission problem with one of my VB6 COM DLL objects. I quickly found this article Access Denied Error When You Make Code Modifications with Index Services Running. The problem stems from Indexing Service grabbing the temp ASP.Net directory and locking it. Once I shut down the service everything ran fine, including the code I was debugging.
We ran into an interesting problem yesterday. After the CryptoAPI mess we were preparing to put the server back into the pool. Well, one of our web reports was not posting back to the server. Of course I googled around and found this: Service Pack 1 for .NET 1.1 Broke My ASP.NET App.
"Well, there's not much on this page -- just a userid textbox, a password textbox, and a submit button -- oh yea, and a couple of validators. Of course, validators aren't checked clientside by Mozilla, and if they were failing in IE then the page wouldn't even submit! Now why would my validators have started failing all of the sudden, after all the validation scripts don't just change for no reason? Oh yea, didn't my colleague tell me last night that he was going to install the latest critical updates, and maybe that included SP 1 for .NET v1.1? So I checked the Microsoft.NET directory and although there wasn't a new build folder, it did appear that the file dates for the validation files were indeed very recent (actually July 2004). So I copied these files to my domain's aspnet_client folder and everything instantly worked. Now the weird part is that my web app was working this morning, after the SP update, but before my update, so I can only assume that the SP update actually updated my domain's aspnet_client folder, and then I recopied the old ones over it. OK, so maybe I broke it technically, if that's really what happened -- but its still the Service Pack that was the cause."
This was exactly what we were experiencing. We found our fix in the comments. It actually entailed modifying the webUIValidation.js script in the ValidatorCommonOnSubmit function.
"Before Change:
function ValidatorCommonOnSubmit() {
var result = !Page_BlockSubmit;
Page_BlockSubmit = false;
event.returnValue = result;
return result;
}
After Change:
function ValidatorCommonOnSubmit() {
event.returnValue = !Page_BlockSubmit;
Page_BlockSubmit = false;
return event.returnValue;
} "
UPDATE: Our admin got on the horn with Microsoft and they told him to run the aspnet_regiis.exe -c command. He then cleared the cache and cookies and the site worked. So the code change in the webUIValidation.js isn't necessary.
One of the best crossover moves I've ever seen happened on a football field. In a game against Louisville Devin Hester returns a punt to the house and puts the punter in crutches after he fakes left and then goes right. The punter collapses on to the turf and cries for his mommy.
While using the new Windows Shell I had a small problem with the current version of ASP.Net 1.1. For the new shell to work I had to install the .Net Framework 2.0 Beta 1. So when I came in to work this morning and cracked open Visual Studio 2003 I got smacked with an "Error while trying to run project: Unable to start debugging on the web server." error. So I googled the problem and found a solution. I changed the ASP.Net version to 1.1.4332.0 (from 2.0.40607.0) in the IIS properties of the web site and everything worked just fine. So now I've got the new shell and my current projects on the same box. Pretty cool.
Channel 9 has recently posted some incredible videos on the new Windows Command Shell (WSH) code named Monad. All I could say was "holy crap Batman!" Monad is an extremely powerful shell interface that let's you do practically anything in the shell. I was so impressed I signed up for the beta at beta.microsoft.com. (The ID for the beta is mshPDC.) I've just installed it and have started toying around. This thing is quite impressive.
From wikipedia.com: "Podcasting is the creation and aggregation of discrete, downloadable media files. Typically, audio files are created on a computer and then uploaded to a Web server on the Internet. An RSS 2.0 feed with enclosure tags is then amended each time a new media file is published, with a URL linking to each enclosure."
Ya, I've been listening some podcasts and downloading them via iPodder. Two of my favorites are Engadget and DotNetRocks (of course). Maybe Jed will have a podcast. That would be cool.
Many moons ago I created an encryption dll for our company website. This dll was created in VB6 and using the CryptoAPI. OK, so I cheated a bit and used some encryption code that was created by Fredrik Qvarfort. But why reinvent the wheel? Or the CryptoAPI calls? Anyways, during a routine security patch deployment the encryption dll on one of the servers stopped working. The funny thing was it was working fine on the other machines. So we reinstalled the web application, uninstalled and reinstalled the COM dlls as well as some system dlls. But the dll was still not working. So I had to do what I didn't want to do, write some debug code. I cracked open VB6 and wondered where all my intellisense, formatting and inline help went. But after a few minutes it all came back. Like an old glove, worn but it still fits.
The problem stemmed from the CryptAcquireContext function call. The CryptAcquireContext function gets a handle to the key container (where the keys are stored). Here is the code we were using:
'Get handle to CSP
If (CryptAcquireContext(hCryptProv, KEY_CONTAINER, SERVICE_PROVIDER, PROV_RSA_FULL, CRYPT_MACHINE_KEYSET) = 0) Then
If (CryptAcquireContext(hCryptProv, KEY_CONTAINER, SERVICE_PROVIDER, PROV_RSA_FULL, CRYPT_MACHINE_KEYSET + CRYPT_NEWKEYSET) = 0) Then
Call Err.Raise(vbObjectError + Err.LastDllError, , "CryptAcquireContext - " & DetermineError(Err.LastDllError))
End If
End If
The first call to CryptAcquireContext attempts to gain access to an existing key container. The second attempts to create a new container if it cannot find the existing key container. The first call was giving me an error of -2146893802. The second call was sending an error of -2146893809. Big help. Luckily, Microsoft has a KB article on translating automation errors for VB. I was able to cross reference the error hex codes with another KB titled CryptAcquireContext() use and troubleshooting. And there is where I found my Rosetta Stone. Turns out that the errors -2146893802 (0x80090016 or NTE_BAD_KEYSET) and -2146893809 (0x80090019 or NTE_EXISTS) together implies that access to the key container is denied. Great! But where are the key containers stored? Through a bit more searching I found the answer, on the file system. Machine keys are kept at \Documents and settings\All Users\Application Data\Microsoft\Crypto\RSA\Machinekeys. User keys are kept at \Documents and settings\\Application\Data\Microsoft\Crypto\RSA\. Once we deleted the key container the dll worked perfectly! Whew, that was a close one! Dealing with the CryptoAPI directly is a nightmare and I've got the proof. I'm going to go crack open .Net now and regain some sanity into my life.
UPDATE: When we deleted the key container it looks like we deleted other key containers as well. This caused IIS to fail and and we had to reinstall IIS.
Bill Simmons (probably the nations biggest Boston fan) of ESPN has written his account of last's nights win over the Yankees. Great stuff. Now go and win the series because next year is our year!
And yeah, I know. We need to win the World Series to complete the dream. But you can win the World Series every year. You only have one chance to destroy the Yanks. As my friend Mike (a Tigers fan) wrote me last night, "Everyone outside of Yankee brats are celebrating quietly with you guys. It's like you killed Michael Myers, Jason, Freddie Kreueger and Hannibal Lecter in one night."
More Posts
Next page »