>I am attempting to migrate an application (.net CF1.0 / SQL CE 2.0 using
> merge replication with SQL 2000 db) from a device running Pocket PC 2003
[quoted text clipped - 9 lines]
> "a request to send data to the computer running IIS has failed. For more
> information see HRESULT"
First, extract the HRESULT error by iterating through the SQLCeException
(see code below). Given the error message you should be able to retrieve the
specific error. I've had the "Athis problem as well
Example:
Error code: 80072F06. 8007 tells you it's related to IIS (which we already
know). The next part 2F06 gives you the specific error. Paste it into your
calculator and transform it from hex to decimal. It gives you 12038. Looking
in wininet.h you see this error is: ERROR_INTERNET_SEC_CERT_CN_INVALID.
Which indicates a certificate problem.
Hope this helps!
/ Peter
public static string ShowErrors(SqlCeException e, bool ShowMessage)
{
SqlCeErrorCollection errorCollection = e.Errors;
StringBuilder bld = new StringBuilder();
string strResult = "";
Exception inner = e.InnerException;
foreach (SqlCeError err in errorCollection)
{
bld.Append("\n Error Code: " + err.HResult.ToString("X"));
bld.Append("\n Message : " + err.Message);
bld.Append("\n Minor Err.: " + err.NativeError);
bld.Append("\n Source : " + err.Source);
foreach (int numPar in err.NumericErrorParameters)
{
if (0 != numPar) bld.Append("\n Num. Par. : " + numPar);
}
foreach (string errPar in err.ErrorParameters)
{
if (String.Empty != errPar) bld.Append("\n Err. Par. : "
+ errPar);
}
strResult = bld.ToString();
if (ShowMessage)
MessageBox.Show(strResult);
bld.Remove(0, bld.Length);
}
return strResult;
}