A customer recently sent me the following code, which uses VSS automation to open a SourceSafe database via an ASP.NET page.  He was running IIS locally against a remote VSS server and, upon running the code got the following error message: ”The SourceSafe database path Guest does not exist. Please select another database.”

<%@ Import Namespace="SourceSafeTypeLib" %>
<html>
 
<head>
   
<title>Testing VSS Automation with ASP.NET</title></head>
 
<body>
   
<script language="C#" runat=server>

VSSDatabase db = new VSSDatabase();

void Page_Init (Object oSender, EventArgs oEvent)
 {
 
string path = @\\vsufile\vsstest\srcsafe.ini;
  string user = "Admin";
 
string pass = "*pass!1wor2t";
 
db.Open(path, user, pass);
 }

   
</script>
  </body>
</html>

Issue Description and Workaround
This error message appears when VSS is unable to locate or gain access to a srcsafe.ini file.  To work around this issue, one must grant permission to the ASPNET user for the \\vsufile share or allow IIS impersonation on the Web server.
The appearance of "Guest" in the error message is a known issue. Apparently, the 'user' and 'path' variables got transposed in the code.

This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft kann für die Richtigkeit und Vollständigkeit der Inhalte in dieser Newsgroup keine Haftung übernehmen. Este mensaje se proporciona "como está" sin garantías de ninguna clase, y no otorga ningún derecho.