sql server replication:
My sqlce program works fine within intranet using usb cradle. It can
sync data via both http and https protocol. To verify sqlce agent, both
http://hostname/sqlce2/sscesa20.dll and
https://hostname/sqlce2/sscesa20.dll can show "SQL Server CE Server
Agent" in browser. That's work terrific in intranet. However When I
try to sync data over public internet(GPRS), it always give me error "A
request to send data to the computer running IIS has failed". On
Pda(windows mobile2003), Pocket IE can show "SQL Server CE Server
Agent" on address https://hostIPaddress/sqlce2/sscesa20.dll but not
show that info on http://hostIPaddress/sqlce2/sscesa20.dll
I guess might some problem about certificate authentication. If I want
to use https protocol to sync, do I need to install .cer file in my
PDA? And what should I setting up on iis. my system is win2003 small
bussiness edition.
pda is xdaii win mobile 2003 and sql server 2000+sp4 and sqlce server
agent sp4 locate in same pc.
Thanks for any suggestion and solution.
I post my code under the line( which is duplicate from msdn sample, so
I think wouldn't have problem....)
___________________________________
Dim replPop As New SqlCeReplication
replPop.InternetUrl = InternetServer
replPop.InternetLogin = InternetUser
replPop.InternetPassword = InternetPassword
replPop.Publisher = Publisher
replPop.PublisherDatabase = PublisherDatabase
replPop.Publication = Publication
replPop.PublisherSecurityMode =
SecurityType.DBAuthentication
replPop.PublisherLogin = PublisherLogin
replPop.PublisherPassword = PublisherPassword
replPop.SubscriberConnectionString = LocalConnection
replPop.Subscriber = Get_DeviceID()
If cnPop.State = ConnectionState.Open Then cnPop.Close()
If init Then
' Delete the database if the database exists.
'
If File.Exists(LocalDatabase) Then
File.Delete(LocalDatabase)
End If
' Clear the dataset if it exists.
'
If (Not (dsPop Is Nothing)) Then
dsPop.Clear()
End If
' Create the Local SSCE Database subscription.
'
replPop.AddSubscription(AddOption.CreateDatabase)
End If
' Synchronize to the server database to populate the
Subscription.
'
replPop.Synchronize()