Tonight I wrote a blog and wanted to share my code. I had two options.
- Zip up the solution/project/code/html/etc and copy/move it over to a directory on my web server which has external access.
- Let SVN do all the work for me and whip up the code in VS08, add the project to SVN, commit the code and BOOM, DONE! Awesome!
I used to do it like #1, but tonight I'm trying it out like #2. Can you tell I MUCH prefer that way? :>>>> This let's me focus back on coding instead of managing files, especially if I make a small booboo (those bugs are features right? :>>>>) and have to update the code, the blog entry automagically references the right code base. BEAUTIFUL! But in order to do that, I had to convince SVN (VisualSVN Server in my case) to allow anonymous access to my code. The trick here was found after reading Rick Strahl's blog (thank you Rick! :>).
To do this, there are four steps you have to perform. Don't worry, there's no rocket science here, nothing that'll take you an hour to do, just four small, simple steps you need to do to convince your code to grow legs and start walking! :>
The first trick is to edit the the Apache server's httpd-custom.conf file (http daemon configuration file) and add the Satisfys All in the Location node. The caveat here is, you could update the httpd.config file, but whenever you upgrade or change the SVN ports, this setting gets whipped out and you have to redo it. So save yourself the future headache of having your friend's emailing you saying your source code server's down.

Second, you'll have to setup your repository security so that "Everyone" has access, most likely with "Read Only" permissions.

Thirdly, you'll have to restart the SVN server. You changed the config file, so you'll have get Apache to reload it again. Nope, sorry, it's not like IIS and dynamically reloads like web.config after changes. Visual SVNServer gives you a nice admin tool with a restart button for convenience.
Fourth and lastly, you'll have to open up the SVN Server's port in your router. Sorry, I can't help you out much there (and if you pooch things here, you'll probably be off the internet, so be careful what you change here, on the other hand, you won't be able to get back on to complain to me, DOH! :>). The best I can do is suggest you look for something that says Port Forwarding with links to a Port Range, Protocol IP Address and if you're lucky an option to enable/disable them.
At this point, you'll be able to point people to your code, either with their browser, or with the SVN client. If you wanted to look at my code, the SVN url is:
http://www.pchenry.com:8080/svn/Blog/trunk
This can be used either in your favourite browser, or by command line like
svn checkout http://www.pchenry.com:8080/svn/Blog/trunk
Grab a coffee and get coding! :>
Resources: Rick Strahl: Running VisualSVN Server for Subversion Source Control