G
Greg Hellem
I have a .NET CF 2.0 Mobile Application that sends "collected data" to a
HTTPS Server (running Apache under Windows 2000) and the XML file (SOAP)
containing the collected data "occasionally" appears corrupted on the server
side, but only when the XML file is greater than 34K in size, and cannot be
properly parsed as an XML Document due to missing / corrupt XML Tags. I say
"occasionally" because I cannot reproduce this error myself and only a few
of our customers (2-3 out of 70) using the mobile application have
experienced this situation. The XML file is never corrupt as long as it is
under 34K in size.
In an attempt to reproduce this error I have sent "collected data" files as
large as 125K without any XML errors and did so using various Internet
Connections, i.e. using our corporate intranet, the Internet via ADSL from
my home and using ActiveSync running on a Desktop Machine connected to our
intranet and the Internet. I have NEVER been able to reproduce this error
which led me to believe that the problem was due to hardware failures of the
mobile device itself or the customers network, but after extensive research
and testing this does not appear to be the problem either. Also, the
"collected data" itself does not contain any characters that would violate
the XML standard and I went so far as to add some code to the mobile
application that validates the XML Structure prior to sending the data to
the host server and the structure is always validated before sending but
arrives at the host server corrupted!! I am assuming that the HTTPS / TCP/IP
protocols will handle corrupt packets via the packet checksum and request
the packet again, so I don't think data is being corrupted during its trip
to the host server but instead is actually corrupt when being transmitted
from the mobile device itself, hence the packet checksums are always
correct. The mobile device is a Symbol MC3090 running WinCE 5.0 and Symbol
(now Motorola) has no mention of any "data corruption" within their
knowledgebase regarding these devices.
I have read the Microsoft Article (ID 831578) regarding "Memory Leak When
SSL and Client Certificates are Used With the HttpWebRequest Object" but am
unsure if this applies to the .NET CF 2.0. We are using HTTPS / SSL and I am
using the standard example given for the
LocalCertificatePolicy.CheckValidationResult to eliminate certificate
problems such as mismatched certificate and machine names but I do not
ignore an invalid certificate.
Originally I was using .NET CF 1.1 when I created this application and ran
into a .NET CF bug regarding the use the HttpWebRequest class over HTTPS
whereby the workaround was to set AllowWriteStreamBuffering = True and to
not specify the ContentLength property. Even though the project has been
upgraded to .NET CF 2.0 I am still abiding by the workaround for the .NET CF
1.1 bug. Is this still an issue in .NET CF 2.0?
An example of the corrupted xml data: (closing tag of </ItemEnterpriseName>
is corrupt and opening <ItemName> tag is missing along with the data itself)
<Name>DEFAULT</Name>
<ItemEnterpriseName>Comtech Data</ItemEnterpriseNa4A</ItemName>
<SiteEnterpriseName>Comtech Data</SiteEnterpriseName>
.... data continues ...
The data should have appeared as:
<Name>DEFAULT</Name>
<ItemEnterpriseName>Comtech Data</ItemEnterpriseName>
<ItemName>IC/SO-NC7SBU3157</ItemName>
<SiteEnterpriseName>Comtech Data</SiteEnterpriseName>
.... data continues ...
Any assistance in the matter would be tremendously appreciated!!!
Thank you,
Greg Hellem
HTTPS Server (running Apache under Windows 2000) and the XML file (SOAP)
containing the collected data "occasionally" appears corrupted on the server
side, but only when the XML file is greater than 34K in size, and cannot be
properly parsed as an XML Document due to missing / corrupt XML Tags. I say
"occasionally" because I cannot reproduce this error myself and only a few
of our customers (2-3 out of 70) using the mobile application have
experienced this situation. The XML file is never corrupt as long as it is
under 34K in size.
In an attempt to reproduce this error I have sent "collected data" files as
large as 125K without any XML errors and did so using various Internet
Connections, i.e. using our corporate intranet, the Internet via ADSL from
my home and using ActiveSync running on a Desktop Machine connected to our
intranet and the Internet. I have NEVER been able to reproduce this error
which led me to believe that the problem was due to hardware failures of the
mobile device itself or the customers network, but after extensive research
and testing this does not appear to be the problem either. Also, the
"collected data" itself does not contain any characters that would violate
the XML standard and I went so far as to add some code to the mobile
application that validates the XML Structure prior to sending the data to
the host server and the structure is always validated before sending but
arrives at the host server corrupted!! I am assuming that the HTTPS / TCP/IP
protocols will handle corrupt packets via the packet checksum and request
the packet again, so I don't think data is being corrupted during its trip
to the host server but instead is actually corrupt when being transmitted
from the mobile device itself, hence the packet checksums are always
correct. The mobile device is a Symbol MC3090 running WinCE 5.0 and Symbol
(now Motorola) has no mention of any "data corruption" within their
knowledgebase regarding these devices.
I have read the Microsoft Article (ID 831578) regarding "Memory Leak When
SSL and Client Certificates are Used With the HttpWebRequest Object" but am
unsure if this applies to the .NET CF 2.0. We are using HTTPS / SSL and I am
using the standard example given for the
LocalCertificatePolicy.CheckValidationResult to eliminate certificate
problems such as mismatched certificate and machine names but I do not
ignore an invalid certificate.
Originally I was using .NET CF 1.1 when I created this application and ran
into a .NET CF bug regarding the use the HttpWebRequest class over HTTPS
whereby the workaround was to set AllowWriteStreamBuffering = True and to
not specify the ContentLength property. Even though the project has been
upgraded to .NET CF 2.0 I am still abiding by the workaround for the .NET CF
1.1 bug. Is this still an issue in .NET CF 2.0?
An example of the corrupted xml data: (closing tag of </ItemEnterpriseName>
is corrupt and opening <ItemName> tag is missing along with the data itself)
<Name>DEFAULT</Name>
<ItemEnterpriseName>Comtech Data</ItemEnterpriseNa4A</ItemName>
<SiteEnterpriseName>Comtech Data</SiteEnterpriseName>
.... data continues ...
The data should have appeared as:
<Name>DEFAULT</Name>
<ItemEnterpriseName>Comtech Data</ItemEnterpriseName>
<ItemName>IC/SO-NC7SBU3157</ItemName>
<SiteEnterpriseName>Comtech Data</SiteEnterpriseName>
.... data continues ...
Any assistance in the matter would be tremendously appreciated!!!
Thank you,
Greg Hellem