| Join | Help

September 2006 - Posts

Wednesday, September 27, 2006 9:11 PM

Helpers Project

I have decided to make a library of static methods for making coding easier. It is still beta, but I want feedback on features they want added. Here are some of the features that i have in there already:

  • Static Library for working with Arrays. Merging Arrays, Intersecting Arrays, Unioning Arrays, etc.
  • A library of basic Plateform Invoke signatures (not all have been tested).
  • Functions for resizing an image and creating thumbnails (as seen on the ASP.NET Forums)
  • Conversion Helpers, such as converting a Color to an Int32 and IPAddress to a Int64.
  • Mathematical Functions.
  • Serialization Helpers, including fully automated serializing to/from a file, and generics in serialization.

The full project (open source) can get found here: http://blogs.strongcoders.com/files/folders/kevins_code_samples/default.aspx

Share this post: | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted by Kevin Jones with no comments
Filed under:
Friday, September 15, 2006 9:54 AM

Vista goes RC

On the 15th, Windows Vista Release Candidate 1 was announced. I am looking forward to playing around with it.

Get it here:

http://go.microsoft.com/?linkid=5467423

Share this post: | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted by Kevin Jones with no comments
Filed under:
Saturday, September 09, 2006 2:26 PM

The Power of the Event Viewer

Often I answer questions like, "Why is my AppDomain restarting?" or "Why am I losing Session States?". Often gone unoticed, there is a very likely place the problem will be specified. The Event Viewer comes to the rescue. In ASP.NET 2.0 it does a considerable amount of logging of errors in there, including AppDomain restarts, possible reasons for Session values being lost, failure to load an assembly, etc.

And, not surprisingly, IIS writes into the log as well, making the Event Viewer an invaluable tool when diagnosing problems with your Server.

Share this post: | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted by Kevin Jones with no comments
Filed under: ,
Wednesday, September 06, 2006 7:29 AM

Deleting Files in x64 Operating Systems the right way

I first discovered this flaw in the x64 operating systems in Visual Studio. I noticed it wasn't deleting files when I told it to. Those of you that know me might know that I don't use a recycle bin. I have the global recycler set to permanently delete files. When I delete something, I am usually sure of it. If I want to recover it, I pull it out of a tape backup, which I have yet to do.

So let's say I open a 32-bit program, like Visual Studio or Abobe Fireworks. I open the "Open" dialog. I right click a file in there and select delete. It asks me if I want to send it to the recycle bin. That annoyed me. Because I removed the Recycle Bin from my desktop, so I had to regularly check the C:\RECYCLER folder for files that were suppose to be deleted. This may not seem critical, but in Visual Studio it was a problem. Say I open an FTP project, and work with some pages. You will see that VS retrieves the files and caches them locally for working with. Now I close Visual Studio, satisfied that I am done. All of those temp files ended up in my recycle bin.

Now, why does it do that and how can I fix it?

Well those that use the x64 OS know the registry in there is a little different. It works like the System32 and the SYSWOW64 folder. There is a registry key meant just for 32-bit Applications in HKLM\SOFTWARE\Wow6432Node. The operating system's settings fall in the HKLM/SOFTWARE key, so there are two places the recycle bin's settings are stored now. By default, the recycler's settings are stored here:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\BitBucket

and the entry that controls weather a file is permanently deleted or not is a DWORD called NukeOnDelete. When you change the setting in the recycle, it doesn't change it in the SysWow6432Node. However, 32-bit programs like Visual Studio and Fireworks do read from the SysWow6432Node. So the recycler settings are out-of-sync. So if I were to set the entry:

HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\BitBucket@NukeOnDelete="1"

Then the 32-bit programs behave correctly.

Share this post: | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted by Kevin Jones with no comments
Filed under: