I've been trying to write a script to send a push message out when a event is triggered. I currently have a test system running on my windows laptop and our "production" system is running on linux. This code works fine on the windows machine but will cause the linux install to stop working completely (stackoverflow and unhandled exception errors):
Is there any way to get this to run in the ubuntu environment?
Code:
Imports System.IO Imports System.Net Imports System.Text Sub Main(parm as object) const debug = false const server = "XXXX" const postData = "{""token"": ""XXX"", ""user"": ""XXXX"",""message"": ""Garbage""}" ' Create a request using a URL that can receive a post. const server_url = "http://" & server & "/settings" Dim request As WebRequest = WebRequest.Create(server) ' Set the Method property of the request to POST. request.Method = "POST" ' Create POST data and convert it to a byte array. Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData) ' Set the ContentType property of the WebRequest. request.ContentType = "application/json" ' Set the ContentLength property of the WebRequest. request.ContentLength = byteArray.Length ' Get the request stream. Dim dataStream As Stream = request.GetRequestStream()
Comment