public Stream GetSession() { //based upon business logic send back a session id string sessionXml = String.Format("<Session>{0}</Session>", Guid.NewGuid().ToString()); //Convert the stream into string Encoding encoding = Encoding.GetEncoding("ISO-8859-1"); WebOperationContext.Current.OutgoingResponse.ContentType = "text/plain"; byte[] returnBytes = encoding.GetBytes(sessionXml); //Send it back return new MemoryStream(returnBytes); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)