|
Home > Archive > IIS Server Security > February 2005 > IIS 6.0 on server 2003 cause Ado connection failure
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
IIS 6.0 on server 2003 cause Ado connection failure
|
|
| oded@msecurity.net 2005-02-12, 5:49 pm |
| Hi all, I recently migrated an ASP code to IIS 6.0
and now I'm experiencing problems with the connection to the ADO.
This function is from a dll which is called by a VB script.
the client run on server 2003 at the same location as the IIS server
the ADO fails only when I connect at transaction mode.
It fails locally, I checked the outgoing communication and there is no
communication with the database server
It seems like a permission problem, but I'm uncertain
Doe's someone has some clue on the matter?
this is the code , I hop it can help
the function fails at the open connection line
Function GetForums(Optional ByVal prmIdF As Long = 0, Optional ByVal
Field As String = "Sort", Optional ByVal Direction As String = "ASC")
As Recordset On Error GoTo err_label
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim strsql As String
strsql = "Sp_Forum_Select_Forums '" & Field & "','" & Direction &
"'," & prmIdF
Set cn = New ADODB.Connection
cn.Open strconn -> fails here
cn.CursorLocation = adUseClient
Set rs = New ADODB.Recordset
rs.Open strsql, cn, adOpenDynamic, adLockReadOnly
rs.ActiveConnection = Nothing
Set GetForums = rs
cn.Close
Set cn = Nothing
Exit Function
err_label:
Dim errorLog As Login
Set errorLog = New Login
errorLog.SaveError vLogXML, "Frm", "GetForums", Err.Number,
Err.Description
Set errorLog = Nothing
Set rs = Nothing
Set cn = Nothing
Set GetForums = Nothing
Exit Function
End Function
| |
| Ken Schaefer 2005-02-13, 8:47 pm |
| a) Where is strConn defined? Are you sure it has a good value?
b) What is the error you are receiving? Is it is some kind of permissions
error? Or maybe some kind of error relating to not being able to
contact/locate the server? etc
Cheers
Ken
<oded@msecurity.net> wrote in message
news:1108240350.938669.241580@z14g2000cwz.googlegroups.com...
> Hi all, I recently migrated an ASP code to IIS 6.0
> and now I'm experiencing problems with the connection to the ADO.
>
> This function is from a dll which is called by a VB script.
> the client run on server 2003 at the same location as the IIS server
>
> the ADO fails only when I connect at transaction mode.
> It fails locally, I checked the outgoing communication and there is no
> communication with the database server
>
> It seems like a permission problem, but I'm uncertain
>
> Doe's someone has some clue on the matter?
>
> this is the code , I hop it can help
>
> the function fails at the open connection line
>
> Function GetForums(Optional ByVal prmIdF As Long = 0, Optional ByVal
> Field As String = "Sort", Optional ByVal Direction As String = "ASC")
> As Recordset On Error GoTo err_label
>
> Dim cn As ADODB.Connection
> Dim rs As ADODB.Recordset
> Dim strsql As String
>
> strsql = "Sp_Forum_Select_Forums '" & Field & "','" & Direction &
> "'," & prmIdF
>
> Set cn = New ADODB.Connection
> cn.Open strconn -> fails here
> cn.CursorLocation = adUseClient
>
> Set rs = New ADODB.Recordset
> rs.Open strsql, cn, adOpenDynamic, adLockReadOnly
> rs.ActiveConnection = Nothing
>
> Set GetForums = rs
>
> cn.Close
> Set cn = Nothing
> Exit Function
>
> err_label:
> Dim errorLog As Login
> Set errorLog = New Login
> errorLog.SaveError vLogXML, "Frm", "GetForums", Err.Number,
> Err.Description
> Set errorLog = Nothing
>
> Set rs = Nothing
> Set cn = Nothing
>
> Set GetForums = Nothing
> Exit Function
> End Function
>
|
|
|
|
|