December 2009 Archives

SqlCeReplication PublisherSecurityMode

| No Comments

I've been toying around with SQL Server CE replication. For whatever reason, my code was failing with the following exception when I called Synchronize():

Failure to connect to sql server with provided connection information. sql server does not exist, access is denied because the iis user is not a valid user on the sql server, or the password is incorrect.

As it turns out, if you use the follow form of the SqlCeReplication ctor (as observed using Reflector):

public SqlCeReplication(string internetUrl, string internetLogin, string internetPassword, string publisher, string publisherDatabase, string publication, string subscriber, string subscriberConnectionString)

the PublisherSecurityMode is set to SecurityType.NTAuthentication. Otherwise, if you use the parameterless ctor, PublisherSecurityMode is left to its default, which is SecurityType.DBAuthentication. This assignment is NOT documented.

Powered by Movable Type 5.01

Twitter Updates

    Follow me on Twitter

    About this Archive

    This page is an archive of entries from December 2009 listed from newest to oldest.

    August 2009 is the previous archive.

    February 2010 is the next archive.

    Find recent content on the main index or look in the archives to find all content.