D
devgrt
[PocketPC2003, C#, .Net CF 1] <--> [IIS6]
We post some xml to https as shown below. The server supports SSL 3.0 and
TLS. We wnat to force the PocketPC 2003 application to only use TLS for FIPs
compliance. Is that possible? I see in .Net non-CF that you can do
something like System.Net.ServicePointManager.SecurityProtocol =
SecurityProtocolType.Tls; but that does not sem to be supportted on CF.
Thank you!
string stream = ...
string url = "https://myserver.com/myreceiver.aspx";
byte[] bytes = Encoding.UTF8.GetBytes(stream);
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(url);
request.Method = "POST";
request.Timeout = 60000; //What would be best Timeout value?
//request.ContentLength = bytes.Length;
request.AllowWriteStreamBuffering = true;
//Note: must have utf-8 per W3C
request.ContentType = @"text/xml; charset=""utf-8""";
Stream requestStream = request.GetRequestStream();
requestStream.Write(bytes, 0, bytes.Length);
requestStream.Close();
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream st = response.GetResponseStream();
StreamReader myReader = new StreamReader(st);
responseFromServer = myReader.ReadToEnd();
st.Close();
myReader.Close();
response.Close();
We post some xml to https as shown below. The server supports SSL 3.0 and
TLS. We wnat to force the PocketPC 2003 application to only use TLS for FIPs
compliance. Is that possible? I see in .Net non-CF that you can do
something like System.Net.ServicePointManager.SecurityProtocol =
SecurityProtocolType.Tls; but that does not sem to be supportted on CF.
Thank you!
string stream = ...
string url = "https://myserver.com/myreceiver.aspx";
byte[] bytes = Encoding.UTF8.GetBytes(stream);
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(url);
request.Method = "POST";
request.Timeout = 60000; //What would be best Timeout value?
//request.ContentLength = bytes.Length;
request.AllowWriteStreamBuffering = true;
//Note: must have utf-8 per W3C
request.ContentType = @"text/xml; charset=""utf-8""";
Stream requestStream = request.GetRequestStream();
requestStream.Write(bytes, 0, bytes.Length);
requestStream.Close();
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream st = response.GetResponseStream();
StreamReader myReader = new StreamReader(st);
responseFromServer = myReader.ReadToEnd();
st.Close();
myReader.Close();
response.Close();