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 a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 17, 2004 at 07:01 PM

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

    Philip

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.