Sunday, March 05, 2006

Answer Re: SorceSafe 2005 -- Visual Studio 2003 Issue/ help needed

Some of the answer is in this post
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=1130

Basically, if you really want to browse the service and view the functions, you have to edit the web.config file for the service, set the customErrors to Off or RemoteOnly (which you already did if you got the "Request format is unrecognized" error), and also remove the '' line.

Note however that you may be able to browse the service from IE and still not be able to connect to the service with VisualStudio. Getting the "Request format is unrecognized" error message doesn't mean your web service is improperly configured - it is just a security measure, so it's advisable to let it disabled.
If you let custom errors off, an attacker may try to pass bad data to the service, obtain exceptions, then he may get information about your sistem from the errors' callstacks. You'd probably want to play on the safe side and let the custom errors on...

But let's come back to the initial problem...
Since you don’t want to use SSL, what you really need to make VisualStudio connect to the service is:
1) in Ssadmin Server/Configure, uncheck "require SSL"
2) in Ssadmin, add a VSS user matching your Windows account you authenticate with the server (default is domain name user). When SSL is not used, VisualStudio will not pass VSS user names and passwords to the service; the service will perform impersonation and attempt to open the database with the Authenticated user name.
3) have this username with empty password, or if you set a VSS password make sure you check in SSAdmin/Tools/Options/General "Use Network Name for automatic logon"
4) in VisualStudio Tools/Options/SourceControl/SccProvider/Advanced -> uncheck the "use SSL connections" checkbox
5) on the database share
\\shared\folder grant Read/Write access to your Windows account name used to authenticate with the server (default is domain name user). Also, don't forget to set Read/Write NTFS permissions on the database folder for your username.
You don't need to grant permissions to the account used by the service to run (NT AUTHORITY\NETWORK SERVICE on Win2k3 or ASPNET on WinXP and W2k) because the
vss service uses impersonation when accessing the database.

With these settings, you should be able to connect to the database without using SSL.

If you want now to use SSL, just install a certificate on the server (in IIS Manager), then use SSAdmin/Server/Configure and RequireSSL when connecting to the service. You don't need to toggle the "Always use SSL" setting in VisualStudio in Tools/Options/SourceControl/SccProvider/Advanced because VisualStudio will detect that SSL is required and will automatically switch to https (although for performance reasons you may want to set the option, so you don't have to wait until VS detects http connections are not allowed). When connecting with SSL, steps 2 and 3) above are not required (you can use any VSS user name).

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home