Merge Replication - First Attempt

G

Guest

I am implementing merge replication for the first time and I’m having a hard
time getting off first base. The references I’m using are Rob Tiffany’s “SQL
Server CE Database Development with the .NET Compact Framework†and the MS
“.Net Compact Framework†core reference. I have carefully set up the virtual
directory for the sscesa20.dll, and set up the publications with SQL Server
2000. The call to AddSubscription() is successfully creating what I believe
to be an empty (44k) SQL server CE database on my PDA (Windows Mobile 2003).
Upon calling the Synchronize() function, the PDA calculates for about 10
seconds before throwing the following exception: “An incorrect or unsupported
HTTP function call was made. [,,,,,]â€. The documentation simply repeats the
text of the error and provides no further insight. The message is so general
that it really doesn’t lead me to suspect any particular part of my code or
initial setup. Your insight would be appreciated.

Bill

The code I’m using to synchronize looks something like this. (Note that the
web server is set up for anonymous access hence InternetLogin, and
InternetPassword are not set.):

try
{
rep = new SqlCeReplication();

rep.InternetUrl = "http://myWebServer/MergeRep/sscesa20.dll";
rep.Publisher = "myDBServer";
rep.PublisherDatabase = "myDBName";
rep.PublisherLogin = "myUID";
rep.PublisherPassword = "myPassword";
rep.Publication = "myPublicationName";
rep.Subscriber = "myUID";
rep.SubscriberConnectionString = @"Data Source=\My
Documents\myCEDBname.sdf";

if( File.Exists( @"\My Documents\myCEDBname.sdf " ))
{
rep.Synchronize();
}
else
{
MessageBox.Show( "Create DB before Synching stupid", "Error" );
}
}
catch( SqlCeException sex )
{
foreach( SqlCeError error in sex.Errors )
{
MessageBox.Show( error.Message, "Error" );
}
}
 
D

Darren Shaffer

Bill,

A few things:

1) have you verified that a snapshot was created successfully on the server
by
opening Replication Monitor in SQL Server 2000?

2) have you granted the IIS anonymous user (IUSR_YOURMACHINENAME)
permissions
on both the publication and the snapshot folder?

3) there is a newsgroup just for SQL CE - microsoft.public.sqlserver.ce
--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com
 

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

Similar Threads


Top