Sql 移动仿真器连接失败(合并复制)
我试图复制SQL CE 3.5 SP1数据库,但在同步时,出现以下错误: 无法使用提供的连接信息连接到SQL Server。SQL Server不存在,访问被拒绝,因为IIS用户不是运行SQL Server的计算机上的有效用户,或者密码不正确 我使用的是Windows Mobile 6 Professional emulator,我尝试连接的机器是运行Windows XP Professional SP3的Windows虚拟机。我已为emulator配置网络适配器设置“我可以访问网页”、“验证用户权限”、“双重检查IIS设置”和“三重检查我的连接字符串”:Sql 移动仿真器连接失败(合并复制),sql,sql-server-ce,Sql,Sql Server Ce,我试图复制SQL CE 3.5 SP1数据库,但在同步时,出现以下错误: 无法使用提供的连接信息连接到SQL Server。SQL Server不存在,访问被拒绝,因为IIS用户不是运行SQL Server的计算机上的有效用户,或者密码不正确 我使用的是Windows Mobile 6 Professional emulator,我尝试连接的机器是运行Windows XP Professional SP3的Windows虚拟机。我已为emulator配置网络适配器设置“我可以访问网页”、“验证用
SqlCeReplication rpl = null;
try
{
// Creates the replication object.
rpl = new SqlCeReplication();
// Establishes the connection string.
rpl.SubscriberConnectionString = @"Data Source = \Program Files\ParkSurvey\ParkSurvey.sdf; Password = *; Temp File Max Size = 512;
Max Database Size = 512; Max Buffer Size = 512; Flush Interval = 20; Autoshrink Threshold = 10; Default Lock Escalation = 100";
// Sets the Publisher properties.
rpl.PublisherSecurityMode = SecurityType.NTAuthentication;
rpl.Publisher = "PUBLISHER";
rpl.PublisherLogin = "INDICOPUBLIC\\subuser";
rpl.PublisherPassword = "*";
rpl.PublisherDatabase = "PUBLISHER";
rpl.Publication = "ParkSurveyPublication";
// Sets the internet replication properties.
rpl.InternetUrl = "http://replication/sqlce/sqlcesa35.dll";
rpl.InternetLogin = "INDICOPUBLIC\\subuser";
rpl.InternetPassword = "*";
rpl.ConnectionManager = true;
// Sets the Distributor properties.
rpl.Distributor = "PUBLISHER";
rpl.DistributorLogin = "INDICOPUBLIC\\subuser";
rpl.DistributorPassword = "psrAdmin";
rpl.DistributorSecurityMode = SecurityType.NTAuthentication;
// Sets the timeout properties.
rpl.ConnectionRetryTimeout = 120;
rpl.ConnectTimeout = 6000;
rpl.ReceiveTimeout = 6000;
rpl.SendTimeout = 6000;
// Sets the Subscriber properties.
rpl.Subscriber = "ParkSurveySubscriber";
rpl.HostName = "Mobile1";
rpl.CompressionLevel = 6;
rpl.ExchangeType = ExchangeType.BiDirectional;
// Call the replication methods.
rpl.Synchronize();
}
catch (SqlCeException sqlEx)
{
MessageBox.Show(sqlEx.Message);
}
finally
{
// Disposing the replication object
if (rpl != null)
{
rpl.Dispose();
}
}
我还尝试在移动仿真器上的文件资源管理器中打开主机本身,并被提示未找到网络路径。。这让我相信这是模拟器本身的ActiveSync问题。有人有什么建议吗?尝试使用IP地址而不是主机名,并在设备上测试IE中的代理URL。如果您的DB server是SQL 2012,请确保在所有组件上使用最新版本的3.5 SP2我也尝试连接到IP地址,但没有效果,实际上我已经在使用3.5 SP2了。我最初发布的信息是一个打字错误,是我的错误。我还解决了这是否是一个虚拟PC问题,并尝试连接到我自己的PC和我们网络上的其他PC,但没有运气。