User Service Not Creating Passwords?

Hey All -

It seems that when I add a new user (using the User Service), either a password is not being created, or it’‘s not being created as I’‘d expect. When I throw a new user at the server, it is created as I’‘d expect, but I cannot log in using that user’'s credentials UNTIL I change the password. Is this a setting that I have to change somewhere? The code I use to submit the user is below. Please let me know if you need any further detail.

Regards,

Tim

ASCIIEncoding _encoding = new ASCIIEncoding();

string _queryData = string.Format(“type=&secret=&username=&password”, _type, _secret, _username, _password);

byte[] _buffer = encoding.GetBytes(queryData);

    WebRequest _request = WebRequest.Create("http://" + _server + ":" + _port + "/plugins/userService/userservice&type=" + _type + "&secret=" + _secret + "&username=" + _username + "&password=" + _password + "/");

_request.Method = “POST”;

_request.ContentType = “application/x-www-form-urlencoded”;

_request.ContentLength = _buffer.Length;

System.IO.Stream _stream = _request.GetRequestStream();

stream.Write(buffer, 0, _buffer.Length);

_stream.Close();

WebResponse response = (WebResponse)request.GetResponse();

System.IO.Stream _streamResponse = _response.GetResponseStream();

StreamReader streamRead = new StreamReader(streamResponse);

Char[] _readBuffer = new Char[256];

int _count = streamRead.Read(readBuffer, 0, 256);

String _resultData = string.Empty;

while (_count > 0)

{

resultData = new String(readBuffer, 0, _count);

_count = streamRead.Read(readBuffer, 0, 256);

}

//TextBox1.Text = _resultData;

if (_resultData.ToString() == “\r\n”)

{

//TextBox1.Text = _resultData + " result as expected";

}

else

{

//error

}

_streamRead.Close();

_streamResponse.Close();

_response.Close();

GetConnection(_username, _server, _password); – this code creates a new connection to the server.

I’'d like to apologize to anyone who wasted their time reading this thread. The problem was a bonehead one: a missing equals sign in this line of code:

string _queryData = string.Format(“type=&secret=&username=&password=”, _type, _secret, _username, _password);

It was missing after the “&password” fragment.

Sorry guys.

Tim

I made a stupid coding omission, causing the User Service to misbehave. All fixed now.