Friday, February 27, 2009

VSS 2005 Web Interface

Step 1: Create your database. Make sure you change the Admin password as it starts out blank.

Step 2: Share the folder. For the share name I added a Vss so I'd know why it was shared.

Step 3: Set your Security in Windows. Add each user and give them modify on the folder. Also, you may have a problem with inherited rights from the parent folder. That seemed to manifest itself as "Access to file...\data\rights.dat denied." Click on the Advanced button and tell it to update all child folders. I just got in the habit of doing this for all users.

One of the things that kept biting me was forgetting to set the Permissions on the share. Click on the Permissions button and add all of the desired users. Make sure you remove Everyone.

Win2003Server Permissions on Sharing tab 

Step 4: Check out Alin Constantin's page. He's got about 90% of the work done.

Tips:

  • If you're going to use a subdomain, have it created and ready to go.
  • Wildcard certificates will work.
  • Make sure that your SourceSafe virtual directory is *not* in a folder that has a web.config.
  • You won't be able to test from the server once you set Windows Authentication because of IIS6's loopback protection.
  • I allowed the error messages and WSDL info to be shown so that I could tell when I had a problem.
  • You may need to copy the SourceSafe folder that contains the Asmx file to your desired folder. Don't forget to create it as an Application in IIS Manager.
  • You will also probably need to create Virtual Directories for VssUpload_db? and VssDownload_db?. You can fill in the question mark by looking at the corresponding folder in the Vss Database folder. Upload only needs read and write, while Download is only read.

I hope this saves someone else the time it took me to figure this out.

Thursday, February 26, 2009

Object Expected error in IE for external Javascript file

Recently ran into one of those silly IE issues that can drive you nuts. I kept getting a JScript runtime error "Object expected" when I tried to call a recently added function in an external file. Funny, function works fine when in the main page. Other functions in the file worked fine. Lots of Google hits but they were all about streaming order.

The answer is that IE has cached your js file and is not reading the current version. The easiest way to correct the issue is to press Ctrl-F5 on the page in IE. This causes IE to completely reload the page.

BTW, this is during development in Visual Studio using the development server. I have a feeling that somehow IE is not seeing that the js file has changed. It may be that the dev server is not changing the date.

Wednesday, February 25, 2009

JavaScript function to automatically add slashes to date

In converting an old Windows app to a browser app, the user wanted to be able to enter dates without the slashes. Here's a simple jscript:

   1: // Function to convert short date string (MMddyy)
   2: // or (MMddyyyy) to a date string (mm/dd/yyyy).
   3: // txtBox is the actual textbox control
   4: // with the value to be processed.
   5: function FixShortDate(txtBox) {
   6:     if (txtBox == null) { 
   7:         return '' }
   8:  
   9:     var re = new RegExp(/(\d{6})(\d{2})?/);
  10:  
  11:     if (re.test(txtBox.value))
  12:     {
  13:         if (txtBox.value.length == 8) {
  14:             txtBox.value = txtBox.value.substring(0, 2) + '/' + txtBox.value.substring(2, 4) + '/' + txtBox.value.substring(4, 8)
  15:         }
  16:         
  17:         if (txtBox.value.length == 6) {
  18:             if (txtBox.value.substring(4, 6) < 20)
  19:             {
  20:                 txtBox.value = txtBox.value.substring(0, 2) + '/' + txtBox.value.substring(2, 4) + '/20' + txtBox.value.substring(4, 6);
  21:             }
  22:             else
  23:             {
  24:                 txtBox.value = txtBox.value.substring(0, 2) + '/' + txtBox.value.substring(2, 4) + '/19' + txtBox.value.substring(4, 6);
  25:             }
  26:         }
  27:     }
  28:     return txtBox.value;
  29: }

I simply add the call to the onBlur event and we're off to the races.

   1: Enter your date:
   2: <input type="text" id="testdate" onblur="FixShortDate(this)" />

I've chosen 2020 as my cutoff year so anything 033120 will be 03/31/1920 while 033119 will be 03/31/2019.

Hope you enjoy.

Monday, February 2, 2009

Kurt Warner belongs in the Hall of Fame

Kurt Warner is the definition of a Hall of Famer. Why? Every time someone said quit, he kept fighting. He took what was given to him and made the best of it. Along the way he got a Superbowl ring, Superbowl MVP honors, season MVP honors and is one of the most dangerous QB's in the game. The greatest show on turf was not a fluke.

Probably the biggest single thing for me is a veteran player who says "I need to improve myself, fix what needs fixing and then I can lead my team". Kurt has done that. Improvements in reading receivers and how he holds the ball. There's not much more a coach can ask player to do.

Oh, by the way his character has been impeccable. A selfless player who works in the community for the benefit of others. Yes, character should count for HoF.

We need more guys like Kurt and Tony Dungy. Christian men who are not afraid to stand up and be counted.

BTW, please play next year. You've still got it and the game needs you!

Steelers are Superbowl Champs

One for the other thumb has been accomplished. I have to confess when I first saw the schedule I thought we'd be lucky to make the playoffs. Then, we struggled with some O line problems, lost a long snapper and a punter. But they did it! Wow!!

Great job guys!!!!! Just one request - could we please start putting teams away a little earlier?! I'm getting older and I'm not sure if I so many close ones in a row!!