in

ASP.NET Weblogs

Brian Desmond's Blog

Inherits Network.Admin
Implements IOneManBand

August 2003 - Posts

  • Relocating a bit

    I found very quickly that I like this whole blogging concept. Problem is, I've got a lot more things to “blog” about than .Net. My blog here @ Http://weblogs.asp.net/bdesmond is supposed to be .Net geared. I've been having an issue with keeping it that way. So, I've engineered a solution. I've installed dotText at Http://www.briandesmond.com/blog & copied my posts from here over to there (unfortunately the great comments had to stay here, though). I fully intend to keep the weblogs.asp.net blog, but I want to try and focus it as much as possible towards .Net. Consequentially, I won't have as many posts here, as I plan to over at briandesmond.com/blog. Over at briandesmond.com/blog, I plan to blog about whatever I feel like blogging about. The majority of it will be technically oriented, no doubt. To be more precise, items from my daily IT grind will show up there a lot. So, if you want to read about IT stuff (and I promise you, there will be useful things here) and other assorted odds & ends, subscribe. The URL to view online is Http://www.briandesmond.com/blog. Conversely, if you want to read about only dotnet, please don't subscribe. I will syndicate .Net items from here to briandesmond.com & vice versa. 

    I haven't exactly figured out what to do with the root briandesmond.com yet, but I eventually want to put up some sort of homepage for myself. I do a fair bit of consulting work, and I'm inclined to believe that a nice site with examples of what I do will help on the business front.

    I'm also working on a widget to plug into the dotText code that will allow me to automatically syndicate posts which are marked for certain categories to URLs defined in those categories. I don't know how this will work, when I will do it, or if I will actually get around to it. I'm lazy, and this will save me posting things twice if I decide to post to the weblogs.asp.net space, so, I'll probably get around to this.

  • MCSA/MCSE - Two Down - Three to go

    Found out that I Passed Exam 70-294: Planning, Implementing, and Maintaining a Microsoft Windows Server 2003 Active Directory Infrastructure and Exam 70-210: Installing, Configuring, and Administering Microsoft Windows 2000 Professional today!

  • Calling for Hotfixes --> Don't be scared

    If you call PSS for a hotfix, i.e. the datagrid accessibility one, you will not be charged. It's even an 800 number ... that makes calling for this hotfix completely gratis. So, rather than complaining about having to pay for this hotfix (or any other one), read the little note in every KB that mentions a QFE:

    Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

    This is a special case. If you call up for a hotfix, and you describe the problem you're having, i.e. “The datagrids in my asp.net pages aren't compliant with accessibility standards”, not only will they give you the fix, but they won't charge you either!

    EDIT: Paschal L points out that a call to PSS is not free where he lives.

    EDIT 2: The reason you have to call for these things is that they're not tested as throughly as a service pack, or a full software package. Therefore, limiting their distribution will also limit how widespread a bug can be. An example of this testing is that the people that make the hotfix will often have whoever calls PSS and identifies a bug test the fix. There is no beta program, or something of that accord.

    Posted Aug 23 2003, 11:15 AM by bdesmond with 5 comment(s)
    Filed under:
  • Teenagers & Computers

    Scoble: “BBC: Teenagers say they want to work with computers for the "excitement and the money.”

    I guess I qualify as an authoritative source on this topic. The kids at school have an annoying habit of figuring that the stuff I do is all fun, easy, and simple. I think they get this impression from watching me do things. No doubt, I can fix the average printer issue in a flash (if you're getting streaks in your inkjet print, try cleaning the printhead), or make Word stop overwriting when you insert text (press [Ins] to toggle overtype mode) with ease.

    There are a lot of things that are great and exciting. One example is seeing an application I spent weeks perfecting go live and work perfectly. Making software work for kids is not the easiest thing to do. No doubt, this is exciting. Similiarly, seeing weeks of not so exciting work payoff is exciting. The benefits are often great too. Getting things done in half the time after a lot of not so exciting work is great. Leaving a bit earlier every day as a result is definetely exciting.

    On the other hand, I cannot, however, make many things happen as easily as replacing an ink cartridge. Most of the non-helpdesk type tasks in my one-man-band operation actually require some serious thinking before trying them (and if I screw up, it's rarely exciting to fix). Getting the higher-ups (downtown) to do thinks like give me a delegation for DNS so I can throw out an ancient NT4 domain and goto 2000 AD. Dealing with bureaucracy is not exciting. Spending a beautiful weekend in a server room restoring a crashed box is definetely not exciting. In fact, it really sucks

    If you're a teenaged person looking to do IT, go for it! Just don't think the whole enchilada is as exciting as it might seem. There are some caveats.

  • More rant on MSBlaster

    Jerry Dennanny rants on MS-Blaster

    “This is a pretty easy statement to make when you are responsible for 1-10 machines, and patching pretty much means hitting windows update.

    However, life isn't that simple for everyone.  In addition to my developer hat, I also have the (mis?)-fortune of being the IT manager for my company's site of ~200 nodes, with about a dozen production servers and a similar number of dev & qa servers.  We are part of a bigger, global enterprise network consisting of about 60,000 nodes.”

    I couldn’t agree more. I’m responsible for about 800 nodes. The Chicago Public Schools System has about 60,000 computers (to which I am connected & represent a small fraction). From what I’ve been told, this blaster worm is already running rampant on the WAN. The technical competency of the techs at the schools isn’t the highest, and coupled with the fact that it’s summer break, the abundance of the worm on the instructional WAN doesn’t surprise me.. The majority of them are computer teachers. There are definitely some very technical ones out there, but I’d say the majority can’t sit down and figure out a way to script removal of the virus from their LAN, if they even have the resources to deploy such a thing. Fortunately for me, I do. Nonetheless, as a veritable one man band (I make the network run, write the software & web apps, fix printers, and take out the trash), making all this happen in the few hours I was in today was not easy. To make matters worse, my software update services server (windows update for the lan) completely crapped out a couple of days ago. I’m rebuilding it tomorrow L.

    Here’s my point: If you want to rant about how everybody should have been all patched up by now, figure this out:

    v     QA the patch on all their major platforms (hardware and software)

    v     Deploy the in such a way that all of the affected computers receive it (note, no assigning software to Windows NT computers via group policy, so you’ll need a different way to deploy to them)

    v     You’re going to need to install the proper patch on the proper version of windows

    v     If you’ve got a few thousand (maybe a few tens of thousands) of computers, you’ll need to figure out a way to get the patch distributed throughout the organization to the proper file servers. Don’t forget to make computers download & install from their local file server. 50 computers at a remote office downloading all downloading at the same time over a slow link isn’t going to work.

    v     The install is going to require a reboot, so you’ll have to get everything rebooted to make your changes effective.

    Now, let’s get to the fact that some computers always straggle and don’t get patched. Cleanup time:

    v     You’ll need to assess how many (and which) computers have the worm

    v     You’ll need to clean the affected machines

    v     You’ll need to deploy the patch to the affected machines

    v     These machines will ned to be rebooted. If scheduled maintenance is on Tuesday, and it’s Thursday now, rebooting people’s computers might not be an option.

    v     Oh, and you’d better have a good explanation for who exactly the NT authority is when your users call asking why their computers are being rebooted continuously couretesy of NT AUTHORITY, or why they even have the worm if your users read the newspaper or watch CNN (both are covering this issue).

    An here’s a bonus point:

    v     Your clients can’t connect to a major portion of the network because it’s located in New York City.

    Have Fun!

  • Password encryption - in your SProcs!

    Whilst working on the login system for a now complete project, I learnt about a couple of unsupported but useful functions in sql - pwdencrypt and pwdcompare. SQL uses these to 1-Way hash passwords. Here's an example of how to use them:

    You'll want a simply users table, note the varbinary(256) column for password

    CREATE TABLE [Users] (
     [Username] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
     [Password] [varbinary] (256) NOT NULL ,
     CONSTRAINT [PK_mmj_Users] PRIMARY KEY  CLUSTERED
     (
      [Username]
     )  ON [PRIMARY]
    ) ON [PRIMARY]
    GO

    The create user operation is pretty straightforward:

    create PROCEDURE mmj_CreateUser
    (
     @Username nvarchar(20),
     @Password nvarchar(15)
    )
    AS

    INSERT INTO
      Users
     (
      Username,
      [Password]
     )
     VALUES
     (
      @Username,
      CONVERT(varbinary(256),pwdencrypt(@password))
     )

    And finally, the validate user procedure:

    ALTER  PROCEDURE ValidateUser
    (
     @Username nvarchar(20),
     @Password nvarchar(15),
     @Valid bit OUTPUT
    )
    AS

    SELECT
     @Valid = pwdcompare(@Password, [Password])
    FROM
     Users
    WHERE
     Username = @Username

    So, to sum things up:

    pwdencrypt accepts a (n)varchar/(n)char value which you then convert to binary format. It always comes out to length 256. pwdcompare accepts two arguments: the supplied password, and the hashed password. It hashes the supplied password using pwdencrypt, and compares that to the hashed password (your password column). If the supplied password is correct, it returns 1, otherwise 0.

    Posted Aug 15 2003, 12:44 AM by bdesmond with 5 comment(s)
    Filed under:
  • I'm 16!

    Well, I turned 16 yesterday (Aug 14). It still feels like it's Aug 14 - spent the better portion of my afternoon devising and implementing a cleanup plan for MS Blaster @ school.

  • GoLive! (not Adobe)

    I put a new site up a little while ago - it's basically an online gallery site. The frontend is pretty simple, but the backend is a little more complex:

    The requirement was to make the gallery page configurable from the back without any technical knowledge. This involved making it so that the site owner could upload new items (only images which were of the proper size, in fact), reorder the gallery, activate/deactivate images, and finally, nuke unwanted items.

    For what it's worth (if anybody else ever needs to implement somehting like this, perhaps), here's the gist of how it works:

    I've got an iframe embedded in a page which shows thumbnails of all the images in the gallery sequence (in their display order). Under each image, I've got a few linkbuttons that either a) redirect to the add/edit page, toggle visibility, move the image left/right in the order, or nuke it alltogether. The Add/edit/delete/toggle buttons are pretty straightforward: I've got the image and the related info about the item (title, description, price) stored in an SQL2000 table. The show/hide toggle just toggles a bit column. My add/edit page checks the size of hte image by feeding the file upload control's inputstream property to an Image object via Image.FromStream, and then I check the image.width & image.height properties.

    The fun thing to implement was the left/right button set. It was a bit tricky to think of, because I usually think of numbers vertically, so to speak. My slideshow, on the other hand is horizontal (and the order is represented numerically). So, even whilst doing the simple math that I did to change display order, it got really confusing doing the translation mentally. Mentally (and in code), I mapped left to “up”, and right to “down”. So, if you moved an image left, the displayorder property decreased, and likewise, right increased it. What I did in my SProcs is I swapped the displayorder of the item left or right (below or above) with the item being swapped.

    So, that's how to implement a jewelry designer's gallery site, in a nutshell.

    Posted Aug 15 2003, 12:32 AM by bdesmond with 2 comment(s)
    Filed under:
  • SQL Error 5177

    The other day, I seriously locked down the drive I keep my SQL & Web data on, to the extent, that I granted solely Domain & Enterprise Admin rights to the root drive, and explicitly gave the Network Service account (for IIS) permissions on wwwroot, and my SQL Service account rights (full control) on my sql data & logs directory.

    Well, SQL2000 doesn't like this. I went to create a new database, and EM told me I had an error 5177 and I'd better check the sql error log. Nothing there. Running the CREATE DATABASE command in QA yielded nothing more useful. SQL Help was just as useless as the error message. It turns out that your SQL Service account needs at least list folder contents rights from the root of the drive all the way down to your sql data folder, where full control for the service account is appropriate. If you're running SQL under the System account (bad), this probably likely won't affect you.

    As a side note, if you're getting this 5177 event, and the service account has rights on the drive & sql data folder, then you may be having a hardware I/O problem. Check for error #823 in the SQL log to confirm this.

    Reference: http://support.microsoft.com/default.aspx?scid=kb;en-us;239759

  • VS Toolbox - Drag 'n' Drop

    I've just discovered yet another cool feature in VS.Net. The toolbox supports dragging & dropping .net assemblies which contain controls onto it. Drag the assembly on, and VS will add it just like if you went to customize toolbox, and then found your assembly, added it, etc.
    Posted Aug 06 2003, 11:54 PM by bdesmond with no comments
    Filed under:
More Posts Next page »