NativeError 28037 A request to send data to the computer running IIS has failed.



I am re-posting my question and attempting to make it a little more clear my
problem. I appreciate any help.

I have installed the following Microsoft SQL Server 2005 Compact Edition
files: (Released 11 Jan 2007)
Microsoft SQL Server 2005 Compact Edition Server Tools
Microsoft SQL Server 2005 Compact Edition Developer Software Development Kit
Microsoft SQL Server 2005 Compact Edition Tools for Visual Studio 2005
Service Pack 1
Microsoft SQL Server 2005 Compact Edition

I have followed the instructions on the SQL Server 2005 Compact Edition
Books Online, Creating a Mobile Application with SQL Server Compact Edition.
I have turned off all firewalls and all permissions have been set as
instructed in the above article. The database resides on a MS Server 2003
running SQL Server 2005 and IIS with all the required updates. I have also
loaded the database locally on Windows XP, SQL Server 2005 Developer, and
IIS.

I can create my publication on the SQL Server 2005 database and created my
subscription on the SQL Server 2005 Mobile database without errors. I have
even published the snapshot without problems via MS SQL Server Management
Studio (SMS). I was also able to connect to the SQL Server 2005 Mobile
database from SMS and ran Synchronies Subscription without error. I ran a
select statement to verify the data updates.

My problem is that no matter what IIS server I try to connect to in code, I
get the same error.
A request to send data to the computer running IIS has failed. NativeError
28037
I have tried local IP Address, Public IP Address, Domain Name, and Computer
Name.

I can at any time run http:// My IP Address/ Virtual Directory
Name/sqlcesa30.dll in my browser and get back:
"SQL Server Mobile Server Agent 3.0"
I have checked my web log, if I run this line in the browser I get an entry
with a 200 status code. I never get an entry when running from code, so the
sqlcesa30.dll is never called.

private string _dataSource = @"\Program Files\CE5Device\ SQLMobile.sdf";
private SqlCeReplication _sqlCeReplication = null;

private void Form1_Load(object sender, EventArgs e)
{
_sqlCeReplication = new SqlCeReplication();
}

private void Sync()
{
try
{
_sqlCeReplication.InternetUrl =
@"http://MyServerName/SQLMobile/sqlcesa30.dll";;

_sqlCeReplication.Publisher = @"MyServerName";
_sqlCeReplication.PublisherDatabase = @"SQLMobile";
_sqlCeReplication.PublisherSecurityMode =
SecurityType.NTAuthentication;
_sqlCeReplication.Publication = @"SQLMobilePublication";
_sqlCeReplication.Subscriber = @"SQLMobileSubscription";
_sqlCeReplication.SubscriberConnectionString = @"Data Source='"
+ DataSourcePath + "';Password='p@$$w0rd';Max Database Size='128';Default
Lock Escalation ='100';";


if (!File.Exists(DataSourcePath))
{
_sqlCeReplication.AddSubscription(AddOption.CreateDatabase);
}

_sqlCeReplication.Synchronize(); // This line errors always.
}
catch (SqlCeException ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
_sqlCeReplication.Dispose();
MessageBox.Show("Replication complete");
}
}


Thanks again for any help.
Brian K. Williams




.



Relevant Pages

  • Re: How To Add/Update Record In ADO.NET
    ... If the row is already there (there is already someone with the same name in the database), ... Hitchhiker's Guide to Visual Studio and SQL Server ... "Jeff Gaines" wrote in message ... SQL Server Compact Edition or Express Edition come to mind. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Which Method to Create a Database Do I Use?
    ... Okay, once the database is built, you have to get rights to access it. ... SSPI and "SQL Server" ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: MOSS and move SQL database
    ... The service SQL Server 2005 Embedded Edition is not listed in the services. ... Sqlcmd: Error: Microsoft SQL Native Client: Login timeout expired. ... Should I reference that in the command listed above? ... Backup the web application and check the database ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Which Method to Create a Database Do I Use?
    ... >> SQL Server Configuration Manager ... This mode assumes that the Windows User or IIS has rights to access the SQL Server itself and the database mentioned as the initial catalog in the Connection String. ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ... "Jonathan Wood" wrote in message ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: How do you clear a datatable?
    ... When i look at the database in Server Explorer, ... Hitchhiker's Guide to Visual Studio and SQL Server ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ...
    (microsoft.public.dotnet.framework.adonet)