Can not connect to Visual Source Safe from ASP

M

MEHDI

Here is the portion of the asp pages(vb script) that fails:
SrcSafeIni = "F:\Microsoft Visual Studio\VSS\441_VSS\srcsafe.ini"
UserName ="Admin"
Password =""

'On Error Resume Next

Set objVSSDatabase = Server.CreateObject("Sourcesafe")
objVSSDatabase.Open SrcSafeIni,UserName,Password

If Err.Number <> 0 Then
Response.Write "Could Not Connect to the Repository Database"
Response.Write "<BR>"
Response.Write Err.Number & "*****" & Err.Description
Err.Clear

'Response.Write "test"
'Response.Write objVSSDatabase.DatabaseName

End If

The error is :
Error Type:
Microsoft VBScript runtime (0x800A0007)
Out of memory: 'Open'

The same script will work fine if it was adapted and saved as a vbs
file and run by double cliking on it, so this probably means that
something needs to be done to the IIS settings....

Any help will be appreciated.

Thank you
 
T

Tom Kaminski [MVP]

MEHDI said:
Here is the portion of the asp pages(vb script) that fails:
SrcSafeIni = "F:\Microsoft Visual Studio\VSS\441_VSS\srcsafe.ini"
UserName ="Admin"
Password =""

'On Error Resume Next

Set objVSSDatabase = Server.CreateObject("Sourcesafe")
objVSSDatabase.Open SrcSafeIni,UserName,Password

If Err.Number <> 0 Then
Response.Write "Could Not Connect to the Repository Database"
Response.Write "<BR>"
Response.Write Err.Number & "*****" & Err.Description
Err.Clear

'Response.Write "test"
'Response.Write objVSSDatabase.DatabaseName

End If

The error is :
Error Type:
Microsoft VBScript runtime (0x800A0007)
Out of memory: 'Open'

The same script will work fine if it was adapted and saved as a vbs
file and run by double cliking on it, so this probably means that
something needs to be done to the IIS settings....

Is F: a mapped drive or local drive?
http://support.microsoft.com/?kbid=257174
http://www.aspfaq.com/show.asp?id=2168

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com
 
M

MEHDI

Tom:
Thank you for your reply.
F: is a local drive and I gave everyone full control on the folder
F:\Microsoft Visual Studio

Thanks
 
M

MEHDI

Tom:
I wanted to make sure that the file can be read so I wrote the page
below and it displayed the content of the file F:\Microsoft Visual
Studio\VSS\441_VSS\srcsafe.ini.
So it can get to the file but it can not connect to VSS from the ASP
page but can from a VBS page! IUSR_ has access to VSS.

<%@ Language=VBScript %>
<% Option Explicit %>
<html>

<head>
<title></title>
</head>

<body>

<%
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

Dim objTextStream

const strFileName = "F:\Microsoft Visual
Studio\VSS\441_VSS\srcsafe.ini"
const fsoForReading = 1

If objFSO.FileExists("F:\Microsoft Visual
Studio\VSS\441_VSS\srcsafe.ini") then
'The file exists, so open it and output its contents
Set objTextStream = objFSO.OpenTextFile(strFileName, fsoForReading)
Response.Write "" & objTextStream.ReadAll & ""
objTextStream.Close
Set objTextStream = Nothing
Else
'The file did not exist
Response.Write strFileName & " was not found."
End If

'Clean up
Set objFSO = Nothing


%>

</BODY>
</HTML>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top