Tuesday, November 30, 2004

Subversion SCM

 
In addition to using Visual Source Safe for source control, you can also look into using CVS or Subversion. From what I hear, Subversion is easier to run on Windows & "better." And both CVS & Subversion are supposedly easier to manage code, version, branch, merge, check out over the web, etc., etc.

FYI VSS is very very slow over a VPN. Very slow. You can't imagine how slow. ;)

Read about setting it up on Windows

I'll try to post more later...we're going to be looking into source control providers (including Subversion), so check back for a writeup on getting started with open source SCM.



Friday, November 26, 2004

Visual Studio .NET has detected that the specified Web server is not running ASP.NET version 1.1

 
If you're developing in ASP.NET with version 1.1 of the .NET framework, you should install IIS before installing .NET v1.1.

Otherwise you may get the below error when trying to load a project in Visual Studio or Web Matrix:
Visual Studio .NET has detected that the specified Web server is not running ASP.NET version 1.1

Here's the solution:

  1. First, confirm you have .NET 1.1 installed on the web server machine you're running the project on. Check two things:

    • Check for a folder called C:\windows\Microsof.NET\Framework\v1.1.4322\ or C:\winnt\Microsof.NET\Framework\v1.1.4322\ or something.

    • Open up Add/Remove Programs in the control panel and confirm "Microsoft .NET Framework 1.1" is in the list.

    If those two items don't check out, re-install the .NET 1.1 Framework. Now test the project again in Visual Studio...if you still get the error message, continue to step 2.

  2. Make sure IIS is running, and run "aspnet_regiis.exe -i" in your .NET 1.1 framework folder. Open a command line and run
    %windir%\Microsof.NET\Framework\v1.1.4322\aspnet_regiis.exe -i
    . If you get a file not found error, adjust the above command so it's using the right folder name from step 1. Once you execute that command, try out the project in Visual Studio again. It should work, but if it doesn't, try step 3

  3. When in doubt, uninstall .NET 1.1, reinstall it, & restart your machine. :)


The above steps should correct the problem in 99% of the cases. Now, back to developing!



Monday, November 22, 2004

Jotspot, Email, Wikis, and General Wiki Usability Issues

 
So I was reading through Korby Parnell's blog (VSS gurumon) and I noticed he mentioned a new Wiki that I hadn't seen before...Jotspot. From the comparison page it looks very nice indeed -- send emails to it, WYSIWYG editor, calendar, etc. Ofc it won't be free, but it looks very nice!

As you may know, we just kicked up a FlexWiki here at work, and while it was easy to get started with, I can already see that less tech-savvy people will be reluctant to use it. New ASCII formatting codes, no drag & drop, no breadcrumbs, no WYSIWYG editor, no pretty layouts, etc. I'm okay with using it, but there are many people here who seem hesitant. And my formatting options were somewhat limited -- fonts, H-tags, UL, OL, & simple tables.

I already hear the hordes crying, "you don't need wysiwyg!" "breadcrumbs are not the wiki way!" "drag & drop is for wimps!" etc. etc. And they're right -- if our company were composed of Unix admins & tech-minded folks.

But it's not.

Our company not only contains programmers and ascii-gurus, but marketing people, sales people, business people...people who are comfortable with Word and Office and email. In some way, wikis remind me of hand-coding HTML sites. Do you think you can convince your office manager to open up notepad & edit the HTML of the intranet? No way, sucker. And wikis, while much easier to edit than HTML, are still too close to the same track, IMO.

It's important that a wiki -- no, let's call it an information portal -- an information portal should be accessible & useable to anyone who has or needs information. And a lot of the company's information is currently locked away in the heads of very un-technical people who, honestly, probably won't edit the wiki that much. Maybe some of them will convert over, but I'll bet a bunch won't. Which means that information doesn't get into the wiki ... it instead lands in emails & word documents that litter the network, and someone else has to collect & wiki those.

Plus, people are now trained to use sites in a certain way. Amazon, Yahoo, & other sites have conditioned people to use breadcrumbs, to click links instead of the back button, etc. An information portal needs to be useable by people. You can argue that "hey, the wiki way is a better way" and maybe it is, but you won't get enough converts to make it worthwhile. IMO you're better off adapting your site to fit the patterns already built into people's brains. I think Alan Cooper wrote a book (Maybe The Inmates are Running the Asylum?) urging that same point -- that the software's role is to adapt itself to the way people want to use it, not vice-versa.

Lastly, I wanted to mention that IMO formatting is not superfluous...that formatting often helps impart information more successfully. Sometimes formatting is even the information itself! Imagine a flowchart with boxes, colors, & arrows. Now get rid of the boxes, colors, & arrows, & see if you can put together something just as easy to read. Kinda tricky, eh? Now try it with a network diagram. Or an ERD diagram. Or an org chart. See how the formatting enhances and/or embodies the information?

I realize this is a debatable topic, which is why I mention it. Other things -- blogging, running a web site, having an online photo gallery -- are all taking off because they're now much MUCH easier to use. Anyone remember that stuff 3-5 years ago? Yeah, no online photos from grandma. But now it's easy. The technology enables us, and the interface becomes a tool instead of a maze.

And IMO that's where wikis & other tools need to go in order to attain widespread adoption, and bring their advantages to everyone who needs them -- not just techies like you & me. Jotspot seems like a step in the right direction. Too bad that step often involves a license fee. ;/



Thursday, November 18, 2004

Wiki Wiki

 
Yesterday we set up a wiki (FlexWiki specifically) in order to consolidate all the information floating around. We can store information for easy access & easy modification -- think of it like a very lightweight intranet where the content to noise ratio is awfully high. Wiki's are usually free & easy to set up. FlexWiki, for example, is ASP.NET-based, doesn't require a database, obeys NTLM/Windows ACL, and took us 20 minutes to get running. Seriously.

So, you should look into a Wiki if you:

  • ever find yourself telling people the same information over & over again
  • ever find yourself trying to find the "correct" version of a certain informational document
  • ever find yourself trying to get "Document XYZ" updated on the intranet, but you can't update the information because the only person(s) who can edit it are busy or out of the office
  • ever find yourself dealing with ten different places where information is stored, in ten different forms

    Get that information out of your head and into your Wiki!



  • Tuesday, November 16, 2004

    Flash Editors

     
    Was looking into a few different code editors for ActionScript. The Flash MX 2004 Pro editor isn't so great, but I noticed a discussion thread talking about PrimalScript, Eclipse with an AS2 plugin, or SE|PY.

    Honestly, PrimalScript seems pretty nice. It's also $180. :) Stay tuned for reviews.



    IIS Webs set to use "All Unassigned" IPs can end up with "other" webs' traffic

     
    Assume you have some web servers that run IIS with multiple webs inside. Each web is assigned to a specific IP. If you set another web within IIS to use "all unassigned" IPs, it normally won't grab traffic sent to IPs assigned to the other webs.

    However, if those other webs are stopped, then traffic sent to their IPs will get sent to a web set to use "all unassigned" IPs. I would imagine the same would hold true with webs set to use host headers.

    So the moral of the story is: if you have multiple webs in IIS, be careful setting a web to use "all unassigned" IPs -- it might wind up with more traffic than you bargained for.



    Tuesday, November 09, 2004

    Ming - a SWF output library and PHP module

     
    In case you ever wanted to generate SWFs on the fly, check out Ming - a SWF output library and PHP module,



    Friday, November 05, 2004

    Analyzing, Repairing, and Archiving Visual SourceSafe

     
    One thing you want to do regularly is analyze your Visual SourceSafe database for errors. You should also back it up periodically. What most people don't know is that VSS comes with utilities that make repair & backups a snap, as long as you wrap them in a few handy batch/script files. These scripts assume you're running Norton Antivirus and that your sourcesafe database is in the default "C:\Program Files\Microsoft Visual Studio\Common\VSS\data" location.

    Here's an example of a script you can run to analyze your SourceSafe database for errors. It can't repair the errors, because you have to kick people out & lock the database in order to fix errors or back it up. But it can't hurt if you're wondering how badly corrupted your db is.
    ===interactive_analyze_vss.bat===
    @TITLE Analyzing source safe databases

    REM set VSS_DATA_DIR to the SourceSafe "data" directory
    set VSS_DATA_DIR=C:\Program Files\Microsoft Visual Studio\Common\VSS\Data
    FOR /F "tokens=2-4 delims=/ " %%i IN ('date /t') DO SET DATE=%%i-%%j-%%k
    for /f "tokens=1-4 delims=: " %%a in ('TIME /T') do set Time=%%a-%%b

    REM analyze the db
    move "%VSS_DATA_DIR%\backup" "%VSS_DATA_DIR%\backup-%DATE%-%TIME%"

    "C:\Program Files\Microsoft Visual Studio\VSS\win32\analyze.exe" -x -v4 "%VSS_DATA_DIR%"

    pause


    Here's a script that will lock the database and repair any errors. You may have to run it a few times in a row to clean up the last of the errors.
    ===offline_analyze_and_fix_vss.bat===
    @TITLE Analyzing source safe databases

    REM set VSS_DATA_DIR to the SourceSafe "data" directory
    set VSS_DATA_DIR=C:\Program Files\Microsoft Visual Studio\Common\VSS\Data
    FOR /F "tokens=2-4 delims=/ " %%i IN ('date /t') DO SET DATE=%%i-%%j-%%k
    for /f "tokens=1-4 delims=: " %%a in ('TIME /T') do set Time=%%a-%%b

    REM lock ss database
    Copy Nul C:\TEMP\ADMIN.LCK
    Copy ADMIN.LCK "%VSS_DATA_DIR%\loggedin"

    REM clear out backup folder
    del "%VSS_DATA_DIR%\temp\*.*" /f /q
    del "%VSS_DATA_DIR%\backup\*.*" /f /q

    REM stop norton or other antivirus clients
    net stop "symantec antivirus client"

    REM remove network shares (assuming the share is called "VSS_DATA")
    NET SHARE VSS_DATA /DELETE /Y

    REM analyze the db
    "C:\Program Files\Microsoft Visual Studio\VSS\win32\analyze.exe" -f -v4 -i- "%VSS_DATA_DIR%"

    REM back up the analysis backup stuff
    move "%VSS_DATA_DIR%\backup" "%VSS_DATA_DIR%\backup-%DATE%-%TIME%"

    REM recreate network shares
    NET SHARE VSS_DATA=%VSS_DATA_DIR%

    REM start antivirus
    net start "symantec antivirus client"

    REM unlock ss database
    Erase "%VSS_DATA_DIR%\loggedin\ADMIN.LCK"

    @ECHO Finished analysis


    Here's a script that will back up your database to a flat file. You can then stick this file onto tape or CD for archiving, or use it to restore your database in case of total corruption. You can also use this file to restore your database onto a different machine in case you want to move your sourcesafe database.
    ===offline_backup_vss.bat===
    @TITLE Backing up source safe databases

    REM set VSS_DATA_DIR to the SourceSafe "data" directory
    set VSS_DATA_DIR=C:\Program Files\Microsoft Visual Studio\Common\VSS\Data
    FOR /F "tokens=2-4 delims=/ " %%i IN ('date /t') DO SET DATE=%%i-%%j-%%k
    for /f "tokens=1-4 delims=: " %%a in ('TIME /T') do set Time=%%a-%%b

    REM lock ss database
    cd "%VSS_DATA_DIR%\loggedin"
    Copy Nul ADMIN.LCK

    REM stop norton/antivirus client
    net stop "symantec antivirus client"

    "C:\Program Files\Microsoft Visual Studio\VSS\win32\ssarc.exe" -d- "F:\%DATE%-%Time%-vss-backup.ssa" $/

    REM unlock ss database
    cd "%VSS_DATA_DIR%\loggedin"
    Erase ADMIN.LCK

    REM start norton
    net start "symantec antivirus client"
    @ECHO Finished backups


    Lastly, here's a script that will tell you the "real" filename for each of the files within the SourceSafe data directory. When your VSS database gets corrupted and you're having trouble with a certain file, you can use the PHYSICAL.TXT file that this script generates to determine where to look. e.g. myfunctions.cs is corrupted, and PHYSICAL.TXT tells you that "IVHAAAAAA == myfunctions.cs", then you can look in the VSS data directory for files starting with "IVHAAAAAA", open them in notepad, & maybe salvage myfunctions.cs from the info within. Conversely, if VSS analysis tells you that IVHAAAAAA is having serious issues, you'll know that myfunctions.cs is impacted, and take appropriate action (shrug your shoulders, freak out, etc.).
    ===list_physical_files.vss===
    REM list physical files

    "C:\Program Files\Microsoft Visual Studio\VSS\win32\SS" PHYSICAL $/ -R –O@..\PHYSICAL.TXT


    These scripts came in handy one day when we had problems with our VSS box. A developer went to check in his work and got an error, and found that not only did he lose his local copy, but the version in sourcesafe was corrupt as well. Zero kb, and unable to get previous versions. Days of work potentially lost. We ran the analyze&fix job a few times to no avail. So then we ran list_physical_files & found out which VSS data file contained his code (e.g. "ismaaaaa"), then looked into VSS's data directory & saw ismaaaaa, ismaaaaa.a, and ismaaaaa.b. We open each of those in notepad & saw that ismaaaaa.a contained his latest code. We then copied the contents of ismaaaaa.a into a new file, renamed that to the source code file he was working on, checked that back into sourcesafe, and the day was saved.

    The moral of the story: use the above scripts as a starting point to troubleshooting, repairing, and archiving your SourceSafe databases.

    Update: just read something that implies running "net stop server /y" will kick off users. So until I get a chance to update (and test) the scripts, try sticking "net stop server /y" before the "lock vss" step, and "net start server" after the "unlock vss" steps. What's the worst that can happen? :)



    Flexible logging for .NET applications

     
    Someone I was interviewing mentioned he used log4net, a robust .NET logging library. Might be worth checking out.




    Archives
    September 2004   October 2004   November 2004   December 2004   January 2005   February 2005   March 2005   April 2005   May 2005  

    This page is powered by Blogger. Isn't yours?