creating tickets from C#

creating tickets from C#

I am at my wits end trying to create code that creates tickets on service desk.
The code executes with no apparent but no ticket is created.
Any help would be appreciated
c# code:

            ASCIIEncoding encoding=new ASCIIEncoding();

            string postData = "subject=test"; // + subject;
            postData += ("&description=test"); // + description);


            postData += ("&DOMAIN_NAME=XX");
            postData += ("&logonDomainName=AD_AUTH");

            postData += ("&username=username"); // + username);
            postData += ("&password=password"); // + password);



byte[] data = encoding.GetBytes(postData);

// Prepare web request...
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url);
myRequest.Method = "POST";
myRequest.ContentType="application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
Stream newStream=myRequest.GetRequestStream();
// Send the data.
newStream.Write(data,0,data.Length);
newStream.Close();





























                New to ADSelfService Plus?