Over the weekend I tried to get Visual SourceSafe Internet working so that i could work remotely on projects via HTTPS.
My server is Windows Server 2003 with IIS 6.0 and VSS is v. 2005 (incidentally there is a service pack available for VSS 2005, although they've called it a GDR [general distribution release] and it's available here)
Normally you should be able to use the VSS Admin tool's "Configure" option to publish the database on the Internet.
Unfortunately, I spent 5 hours trying to get this to work. I got so far as enabling SSL, remotely browsing to the correct VSS project in the project tree and doing a Get Latest, but whenever I checked anything in I would get "There was a failure uploading the URL" etc; "Do you want to retry the operation?"
I used Fiddler to try to debug what was actually happening, and it translated as a "403.3 Forbidden" from IIS. This would normally mean that write access is denied, but the application pool identity and the IIS anonymous authentication identity both had full access to the VSS temp upload directory.
The check-in mechanism of VSS Internet appears to use WebDAV underneath; so you need to ensure the WebDAV extension is enabled on the web server in the IIS Admin tool. Also, need to ensure that the PUT HTTP verb is accepted. If URLScan is installed (this seems to help lockdown the http verbs that iis can accept) then you need to ensure the PUT verb is inside the AllowedVerbs section of the urlscan.ini (system32\inetsrv\urlscan).
All this, plus, giving the Everyone user full read/write privileges to the VSS upload dir, did not work.
Write Access is Denied.
hmmmm as a last resort, I downloaded the IIS metabase explorer (in the IIS 6.0 resource kit) and changed the id from the website from 2350, to 1; and changed the one that was "1" to "2351"! I did this because the VSS Admin tool tries to enable the database on the website with the ID of "1". I then deleted any virtual directories in any Web Applications/Websites called "SourceSafe".
Then I tried the VSS Admin tool. It interacted with the correct website. This seemed to work. Whatever magic the VSS Admin tool weaves - it worked - provided that the website id of the website that you wish to enable source control on is "1".
I can honestly say, I have no idea what was really wrong, however, my experience has been:
- VSS is generally a poor product at the best of times
- WebDAV is equally dodgy. It seems the IIS team don't talk with the WebDAV team.
It's also my view, that MS should have tested this a hell of a lot more... the problems are prominent and totally reproducible!
So the motto of this story is; get the VSS Admin tool to set up the Internet database access, but make sure that the metabase id of the website is 1 beforehand. I think you can then change it back if you want, although i haven't done this.
Once VSS Internet is configured, it seems to work OK. If you're using Windows Vista and VSS 2005, make sure you install the GDR ("service pack") so that the VSS UI works properly inside Visual Studio 2008.
For general guidance, see this.