Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server CE / September 2007

Tip: Looking for answers? Try searching our database.

SQL CE 2.0 and Windows Mobile 5 Replication Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LexJohn - 18 Sep 2007 22:10 GMT
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 to
one running Windows Mobile 5. I have installed all components without issue
and am able to browse on the mobile device to the virtual directory on the
IIS server for replication. The application successfully starts but throws
the following error when attempting to replicate data:

Error number: -2147012865

“a request to send data to the computer running IIS has failed.  For more
information see HRESULT"
Peter Hartlén - 24 Sep 2007 09:18 GMT
>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;
       }
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.