S
Snedker
Hi folks,
If I outcomment the last four lines the service will start.
If I in-comment the line
"Dim recv As Integer = sock.ReceiveFrom(data, ep)"
the service will fail starting with error code 3534 (the service
reported no errors). Neither are errors written to the event log.
If I run the same code from a console application, everything works
fine.
The code:
Protected Overloads Overrides Sub OnStart(args As String())
Dim iep As New IPEndPoint(IPAddress.Any, 9050)
sock.Bind(iep)
Dim ep As EndPoint = DirectCast(iep, EndPoint)
Dim data As Byte() = New Byte(1024) {}
Dim recv As Integer = sock.ReceiveFrom(data, ep)
Dim stringData As String = Encoding.ASCII.GetString(data, 0, recv)
data = New Byte(1024) {}
End Sub
Any ideas why that particular line prevents service from starting?
Regards
Morten Snedker
If I outcomment the last four lines the service will start.
If I in-comment the line
"Dim recv As Integer = sock.ReceiveFrom(data, ep)"
the service will fail starting with error code 3534 (the service
reported no errors). Neither are errors written to the event log.
If I run the same code from a console application, everything works
fine.
The code:
Protected Overloads Overrides Sub OnStart(args As String())
Dim iep As New IPEndPoint(IPAddress.Any, 9050)
sock.Bind(iep)
Dim ep As EndPoint = DirectCast(iep, EndPoint)
Dim data As Byte() = New Byte(1024) {}
Dim recv As Integer = sock.ReceiveFrom(data, ep)
Dim stringData As String = Encoding.ASCII.GetString(data, 0, recv)
data = New Byte(1024) {}
End Sub
Any ideas why that particular line prevents service from starting?
Regards
Morten Snedker