VSS 2005 WebService problem
Hi hi.
I'm trying to use the new WebServices in VSS2005.
After fiddling around, reading through the forums and doing some more fiddling I've just given up.
The problem is authentication.
I can open the share from my computer, open the project from the share (with the non-internet version of the VSS plugin) and open the webservice url from my computer. I've tried doing SSL, but the result is the same.
If I directly open a project under source control I get "VSS Web Service could not open the database".
*but*
if I use Open project.. and then use the "SourceSafe (Internet)" option to navigate to the .sln file in the VSS database and open it - the project opens (with a "this project is already here" message).
What is the difference of the two methods?
I've tried looking at the logs, from what I can see the server is getting a few requests without the identity and responding with 401:
2005-10-14 20:44:26 W3SVC1 213.213.132.11 POST /SourceSafe/VssService.asmx - 443 - 10.241.1.160 VCSoapClient 401 2 2148074254
2005-10-14 20:44:30 W3SVC1 213.213.132.11 POST /SourceSafe/VssService.asmx - 443 - 10.241.1.160 VCSoapClient 401 2 2148074254
2005-10-14 20:44:30 W3SVC1 213.213.132.11 POST /SourceSafe/VssService.asmx - 443 - 10.241.1.160 VCSoapClient 401 1 0
2005-10-14 20:44:30 W3SVC1 213.213.132.11 POST /SourceSafe/VssService.asmx - 443 CHIMERA\snorri 10.241.1.160 VCSoapClient 200 0 0
My machine is not on the same domain as the server (which is an DC).
Any help or insight would be appreciated :)
p.s.
When I did my first get through the WebService interface it totally ignored my working folder and dumped the project into "My Documents\Visual Studio 2005\Projects"...
[1748 byte] By [
Snorrk] at [2007-12-17]
This is strange. Could you clarify a couple of things so I can understand what you are experiencing?
You can use Source Code Control via VSS plug-in but not VSS Internet plug-in.
What can you do with VSS Internet plug-in?
Can you do Add new project to SCC, Get latest version, Check out, Undo check out?
Open from SCC to new location works but opening source controlled project from disk does not?
Are you using any proxy to connect to your web server?
Does it work from within the same domain?
If you navigate IE to https://yourserver/sourcesafe/vssservce.asmx from you client computer on another domain, do you get a login prompt? Do you get this login prompt when connecting to the server via VSS Internet plug-in?
Is anonymous access disabled for SourceSafe app in the IIS?
Hmm, I seem to also get this problem "VSS Web Service could not open the database".
The only fix I've found is by running the VSS Web Service' application pool as Administrator... Which I really don't want to do.
What security permissions must I check? Who needs to have access to what?
r3n at 2007-9-9 >

You need to make sure you are using impersonation. Check your web.config file. It should say
<identity impersonate="true"/>
Also make sure you are not using Anonymous access
I can confirm anonymous access was disabled.
I added these tags...
<system.web>
<identity impersonate="true"/>
</system.web>
In between the <configuration> tags in the web.config file (in VSSWebService).
The web page (VssService.asmx) still runs ok, so I presume I haven't made any errors in web.config.
However, Visual Studio is still reporting the same error.
I am logging in using a username belonging to the "development" group, who has read/write access to the VssWebDownload and VssWebUpload directories within the VSS database.
Tried granting the "development" group read access to the whole database, but this didn't make any difference.
So, still having to give the IIS worker process Administrator access.
r3n at 2007-9-9 >

Thats interesting... The combination of using the "admin" access worker process and impersonation in the web.config file also causes this error.
Removing imprsonation fixes the issue -- but of course still uses admin worker process, which is pretty bad in terms of security.
r3n at 2007-9-9 >

Hi Roman,
As your suggested, rather than manually configuring the VSS virtual folder, I have allowed VSS admin to the legwork for me.
I enabled SSL on the default server to make the process a little easier; so VSS admin would enable SSL on the virtual folder. I then exprted the configuration for the VSS virtual folder and read it back into my "custom" secure virtual server.
Unfortunately, it's still producing the exact same error as before, so we can safely say it's not a problem with the virtual server configuration (correct?). So perhaps it is as you mentioned, a file security issue. It's vague at best, but the error is as follows.
The current source control operation could not be completed.
The Visual SourceSafe Web Service returned the following error:
VSS Web Service could not open the database.
Not sure if thats *actually* any help at all, but perhaps somebody will recognise the errror.
I had previously set the databases up to what I believe were appropriate security permissions (with regards to the MSDN howtos). As far as security goes, the users have enough access to the VSS databases to access them over LAN/VPN -- this makes me assume that the security is set correctly.
However there must be something I'm missing if the application pool with Administrator access works, and the DefaultAppPool (with IWAM_xxx access) does not. I'd really like to think this is something to do with impersonation, but that didn't *seem* to solve the issue.
Yes if you only had problem with virtual folders configuration you would be able to open database but would not be able to check in or do get. The error you receiving indicates that you can connect to the VSS Web Service but then web service (using ssapi.dll) can not access the database location that client providing. This happens either because client provide incorrect database location or if the account your web service is accessing the folder with does not have read/write access to the share or to the files in that location.
Turning impersonation on (and turning anonymous access off) should allow web service to access the database with user credentials (unless the database is on another computer from the web server).
Could you try configuring remote access using your default web site first by doing the following?
1. Remove web.config from “C:\Program Files\Microsoft Visual SourceSafe\VSSWebService”
2. Restart Web Service (not just the web site)
3. Create new database
4. Create share for the database and allow read/write access to the share
5. Use VSS Admin to enable remote access to the server and this database
6. Register this database on the client
If this works then re-enable remote access to your other databases on the default web site first. Does it work now? If it does, then move it to the other web site.
Please let me know at which step it stops working for you I had the exact same problem (same errors, same data in IIS logs) yesterday and tried all the suggestions made in this thread.
The source of the problem turned out to be the COM configuration of the VSS automation component (ssapi.dll). In order to get better performance from SourceGear's Source Offsite, we had changed the threading model from Apartment to Both. Changing this back to Apartment fixed web service access to VSS.
Don't know if this was the original poster's issue but it's worth checking.
Ron Strong
Probably because your VSS password too long. Try to cut the length of your password. VSS password accept 15 characters.