Force .Net to do TLS only

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();
 
K

Kevin Yu [MSFT]

Hi devgrt,

In .NET Compact Framework 1.0, the
System.Net.ServicePointManager.SecurityProtocol is not supported. So, I
don't think we can specify the security protocol in CF.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
D

devgrt

Do you know of any way this could be accomplished? If it is not possible to
specify in CF is there an under-the-hood way to do it. It is vital since
FIPs requires our application to force TLS on the client side. One thing I
am hoping for is that Eldos Secureblackbox will have a .Net CF version of
their product in the near future and we can use that
(http://www.eldos.com/sbb/) but must wait until they release for CF and then
hope that works on PocketPC apps (vs apps compiled for CE).
Thank you!
 
K

Kevin Yu [MSFT]

Hi,

I think we can achieve this by using PInvoke. You can try to post in the
following newsgroup, so that more professionals will provide their
assistance there.

microsoft.public.pocketpc.developer

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
D

devgrt

I posted in microsoft.public.pocketpc.developer on 12/12 and
microsoft.public.pocketpc.developer.networking on 12/9 but have had no
response. This is a pretty critical for us issue and we would really
appretaite any help in getting it to work -- thanks!
p.s. I am pretty confident Eldos product will work but the experimental
version is still a month off.
 
K

Kevin Yu [MSFT]

Hi devgrt,

You can also try the microsoft.public.win32.programmer.wince newsgroup,
since there are more people in that one.

I'm not quite familiar with pocket pc development. In this case, since this
issue is critical and urgent for you, I suggest you try to contact
Microsoft PSS for it. You will find their contact information from the
following link:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;OfferProPhone

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top