error when synchronizing to SQL server 2000

  • i got an error message "An error has occured on the computer running IIS. Try restarting the IIS server."

    with error code : 80070057

    Minor Error : 28022

    here is my code :

    private void mitemCreateSubscription_Click(object sender, EventArgs e)

    {

    SqlCeReplication replSqlMbl = new SqlCeReplication();

    try

    {

    //Internet Properties

    replSqlMbl.InternetUrl = strURL;

    replSqlMbl.InternetLogin = string.Empty;

    replSqlMbl.InternetPassword = string.Empty;

    //Publisher Properties

    replSqlMbl.Publisher = "Casper2e";

    replSqlMbl.PublisherDatabase = "SQLMobile";

    replSqlMbl.Publication = "SQLMobile";

    replSqlMbl.ExchangeType = ExchangeType.BiDirectional;

    //Security Publisher Properties

    replSqlMbl.PublisherSecurityMode = SecurityType.NTAuthentication;

    replSqlMbl.PublisherLogin = string.Empty;

    replSqlMbl.PublisherPassword = string.Empty;

    //Subscriber Properties

    replSqlMbl.Subscriber = @"Driver#1";

    replSqlMbl.SubscriberConnectionString = strConnLocal;

    replSqlMbl.AddSubscription(AddOption.CreateDatabase);

    }

    catch (SqlCeException exSQL)

    {

    HandleSQLException(exSQL);

    }

    finally

    {

    replSqlMbl.Dispose();

    }

    }

    private void mitemSynchronize_Click(object sender, EventArgs e)

    {

    SqlCeReplication replSqlMbl = new SqlCeReplication();

    try

    {

    //Internet Properties

    replSqlMbl.InternetUrl = strURL;

    replSqlMbl.InternetLogin = string.Empty;

    replSqlMbl.InternetPassword = string.Empty;

    //Publisher Properties

    replSqlMbl.Publisher = "Casper2e";

    replSqlMbl.PublisherDatabase = "SQLMobile";

    replSqlMbl.Publication = "SQLMobile";

    replSqlMbl.ExchangeType = ExchangeType.BiDirectional;

    //Security Publisher Properties

    replSqlMbl.PublisherSecurityMode = SecurityType.NTAuthentication;

    replSqlMbl.PublisherLogin = string.Empty;

    replSqlMbl.PublisherPassword = string.Empty;

    //Subscriber Properties

    replSqlMbl.Subscriber = "Driver#1";

    replSqlMbl.SubscriberConnectionString = strConnLocal;

    replSqlMbl.Synchronize();

    }

    catch (SqlCeException exSQL)

    {

    HandleSQLException(exSQL);

    }

    finally

    {

    replSqlMbl.Dispose();

    }

    }

    the system i use is :

    SQL server 2000 Personal Edition

    SQL server Mobile 2005

    regards,

    Aldrich

    ps: i've tried the replication using IBuySpyDelivery 2005 that i got from http://www.gotdotnet.com and installed it in my PDA and all works perfectly...

  • What shows up in the IIS logs?  Is the IIS machine the same as the SQL server?

  • is this what you mean?

    2007/01/12 18:56:13 Hr=80070585 ERR:REQUEST NOT QUEUED for ulRSCBId = -1

    2007/01/13 15:17:33 Hr=80070585 ERR:REQUEST NOT QUEUED for ulRSCBId = -1

    2007/01/13 15:32:16 Hr=80070585 ERR:REQUEST NOT QUEUED for ulRSCBId = -1

    2007/01/13 18:53:38 Hr=80004005 ERRpenDB failed getting pub version 28627

    2007/01/13 18:54:16 Hr=80004005 ERRpenDB failed getting pub version 28627

    yes, the IIS machine and SQL server is in the same computer..

    hmm, i solved the problem... but i dont know how, i just delete

    replSqlMbl.InternetLogin = string.Empty;

    replSqlMbl.InternetPassword = string.Empty;

    replSqlMbl.PublisherLogin = string.Empty;

    replSqlMbl.PublisherPassword = string.Empty;

    and i got different error message, like this :

    2007/01/14 00:13:39 Thread=98C RSCB=2 Command=SCHK Hr=80045003 You must rerun snapshot because current snapshot files are obsolete. -2147201021

    whats wrong?

  • You need to create the snapshot for the publication.  In the replication monitor on the distributor, open the Agents collection and look for the snapshot agent.  You should be able to right-click and start the agent for the publication.

     

     

  • ok..i'll try and get back to u if i found another error

  • string.Empty is not the same as Nothing (or null). By default the properties you mention are null and not string.Empty. Hence removing the explicit assignations to string.Empty resolved the problem.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply