Sql Repl. Error - Request to send data to the computer running IIS has failed.

T

travis.clayton

Setup(All physically separate machines):
Client - Pocket PC 2003
Web Server - Win2K3 svr, IIS 6.0, Basic Authentication, SSL
w/Certficate, Sql CE agent running, Sql CE sp3
Sql Server - Sql 2000 sp3, Merge Replication publisher

Problem:
Pocket PC is not on the domain, it can just see the web server. User
logs in w/domain credentials. I'm using the
System.Data.SqlServerCe.SqlCeReplication to perform the data sync. Like
so:
using(SqlCeReplication repl = new SqlCeReplication())
{
repl.InternetUrl = "https://sqlcewebserver/sscesa20.dll";
repl.InternetLogin = "DomainUserName";
repl.InternetPassword = "DomainPassword";
repl.Publisher = "SqlSvrComputerName";
repl.PublisherDatabase = "MyDatabase";
repl.Publication = "MyDatabasePublisher";
repl.PublisherSecurityMode = SecurityType.NTAuthentication;
repl.SubscriberConnectionString = "\\Program Files\\MyProgram\\Data
Source=MyDatabase.sdf";
repl.Subscriber = "PocketPCName";
repl.ExchangeType = ExchangeType.BiDirectional;
if(!System.IO.File.Exists(_"\\Program Files\\MyProgram\\Data
Source=MyDatabase.sdf"))
{
repl.AddSubscription(AddOption.CreateDatabase);
}
repl.Synchronize();
}


We initially had IIS set up to run "Integrated Windows auth" and
switched to "Basic Auth". I read here,
http://msdn.microsoft.com/library/d...y/en-us/dnsqlce/html/sqlce_secmodelscen20.asp,
that for windows auth on the IIS server means that it needs to be
physically on the same box as the sql server.

Here is the error detail I'm getting:
The HRESULT: -2147012858, Error Message: "A request to send data to the
computer running IIS has failed. For more information see HRESULT",
Minor err: 28037, Source: Microsoft Sql Server 2000 Windows CE Edition.


I verified that I can navigate to the website from Pocket IE, pass in
my credentials and i get what I'm supposed to, "SQL Server CE Server
Agent". I'm stuck on this one. Is there something else to check on the
sql or web server? Is my topology wrong for this scenario? Any help is
greatly appreciated.

Thanks,
Travis
 
A

Alex Feinman [MVP]

I think instead of
repl.SubscriberConnectionString = "\\Program Files\\MyProgram\\Data
Source=MyDatabase.sdf";

you wanted

repl.SubscriberConnectionString = "Data Source=\\Program
Files\\MyProgram\\MyDatabase.sdf";

Same goes for a call to File.Exists


The problem however is caused by an invalid SSL certificate on your server.
It is not recognized by the device. If you have issued it yourself, make
sure that you have installed the root certificate from your certification
authority on the PPC
 
T

travis.clayton

My apologies, the first was a copy paste job, I am in fact passing,
"Data Source=\\Program Files\\MyProgram\\MyDatabase.sdf" to the
SubscriberConnectionString. As for the File.Exists, I'm doing this:
if(!File.Exists("\\Program Files\\MyProgram\\MyDatabase.sdf"))
Should it be:
if(!File.Exists("Data Source=\\Program
Files\\MyProgram\\MyDatabase.sdf")) ?

My main problem at the moment is the data synching. The certificate was
created by a system admin. He sent me a ".cer" file. I copied it to the
PPC, and clicked on it. It asked me if I wanted to install it and I
did. Is this what you mean by installing the root certificate from the
CA on the PPC? Is there something else that needs to be done?
thx,
Travis
 
T

travis.clayton

My apologies, the first was a copy paste job, I am in fact passing,
"Data Source=\\Program Files\\MyProgram\\MyDatabase.sdf" to the
SubscriberConnectionString. As for the File.Exists, I'm doing this:
if(!File.Exists("\\Program Files\\MyProgram\\MyDatabase.sdf"))
Should it be:
if(!File.Exists("Data Source=\\Program
Files\\MyProgram\\MyDatabase.sdf")) ?

My main problem at the moment is the data synching. The certificate was
created by a system admin. He sent me a ".cer" file. I copied it to the
PPC, and clicked on it. It asked me if I wanted to install it and I
did. Is this what you mean by installing the root certificate from the
CA on the PPC? Is there something else that needs to be done?
thx,
Travis
 
A

Alex Feinman [MVP]

Try clicking on this certificate on your PC and see what server name is
specified in the properties. I suspect that the certificate is issued for a
fully-qualified server name, while you are using just part of it. SSL
certificate issued to myserver.mycompany.com will fail check if the server
is accessed as https://myserver
You might find it easier to test this without SSL to make sure the rest
works.

--
Alex Feinman
---
Visit http://www.opennetcf.org
My apologies, the first was a copy paste job, I am in fact passing,
"Data Source=\\Program Files\\MyProgram\\MyDatabase.sdf" to the
SubscriberConnectionString. As for the File.Exists, I'm doing this:
if(!File.Exists("\\Program Files\\MyProgram\\MyDatabase.sdf"))
Should it be:
if(!File.Exists("Data Source=\\Program
Files\\MyProgram\\MyDatabase.sdf")) ?

No. What you have is correct.
 
T

travis.clayton

This is the Certification status:
"This CA Root certificate is not trusted because it is not in the
Trusted Root Certification Authorities store."
Under the General tab I see the following:
Issued to: website
Issued by: website

I believe it is issued to a fully qualified name, I found this out by
looking at the details tab under the subject property, didn't see a
server name property. Subject looks like this:
CN = website
DC = company
DC = com


I am not particulary versed in Certificates, so I don't know everything
to look for. I will check w/the system admin to verify the Certificate
was created correctly.
 
G

Guest

How i can find my certificate on my pc? I think i have the same problem as
Travis. When i syncronize with active sync no error result, but when i
syncronize over my lan the same error occur.


My objectiv is sync over gprs connection...


Any help? Thanls
 

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