Skip to Content

RFC Server {Converting Console App to .Net Windows Service)

I have created a console app which is working correclty as a RFC server. I want to convert it to a Windows Service.

I'm getting error: Object Not Set To and Instance of an Object

Dim myargs() As String

Try

ReDim myargs(3)

EventLog1.WriteEntry(UBound(myargs))

myargs(0) = "-aPJ1.rfcserv"

myargs(1) = "-gsap008.myserver.com"

myargs(2) = "-xSAPGW08"

Catch ex As Exception

EventLog1.WriteEntry(ex.Message)

End Try

Const numberOfServers As Integer = 3

Dim host As SAP.Connector.SAPServerHost

host = New SAP.Connector.SAPServerHost

Dim server As SAPProxyDllImpl

For I As Integer = 1 To numberOfServers

Try

'ERROR OCCURRING WITH THIS

server = New SAPProxyDllImpl(myargs, host)

Catch ex As Exception

EventLog1.WriteEntry(ex.Message)

End Try

Next

Any Ideas are appreciated.

Is there any documentation for creating a Windows Service as an RFC Server?

Philip

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jun 17, 2004 at 07:29 AM

    It would be easier to find the reason of the problem if you write the whole call stack to event log:

    EventLog1.WriteEntry(ex.ToString())

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 17, 2004 at 11:52 AM

    Hi,

    Array myargs(3) has 4 elements but only the first 3 are initialized with a valid string.

    Regards,

    Guangwei Li

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 17, 2004 at 07:01 PM

    Thanks.. I looked at it too long yesterday. Your correction worked.

    Philip

    Add comment
    10|10000 characters needed characters exceeded