none
HTML5Sample does not work in IIS7 on Windows 7

    问题

  • Hi,

    I trying to use HTML5Sample provided along with Microsoft Sync Framework 4.0 installation.

    I get following output when I ran HTML5Sample kept in ListService example on IIS server:

    [Sync Error]:Error occurs during sync. Please check logs below.
    [Download Change Response Error]: 500 Response: <ServiceError xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Synchronization.Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ErrorDescription>System.FormatException&#xD; Unrecognized Guid format.&#xD; at System.Guid.GuidResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument, String failureArgumentName, Exception innerException)&#xD; at System.Guid.TryParseGuid(String g, GuidStyles flags, GuidResult&amp; result)&#xD; at System.Guid..ctor(String g)&#xD; at Microsoft.Synchronization.Services.WebUtil.ChangeType(Object value, Type type)&#xD; at Microsoft.Synchronization.Services.SyncService`1.InitializeNewClient()&#xD; at Microsoft.Synchronization.Services.SyncService`1.ProcessRequestForMessage(Stream messageBody)&#xD; &#xD; &#xD; </ErrorDescription></ServiceError>
    [Download Change Request]:/ListService/DefaultScopeSyncService.svc/defaultscope/DownloadChanges?userid=
    {"d":{"__sync":{"moreChangesAvailable":false,"serverBlob":null},"results":[]}}
    [Login]:User Info
    {"name":"r","id":""}

    [Login]:Login from /ListService/Login.ashx?username=r

     

    HTML5Sample works fine from Visual Studio development server but it does not work with IIS server on Windows 7 64 bit.

    One more question:

    In SyncSDK_v4.0 (CTP New Features). chm file provided with Microsoft Sync Framework 4.0 installation, I was following Deploying Service under IIS. In that Hosting the service in IIS section, it says "Make sure that the application pool uses .NET Framework 2.0. The following list describes steps to configure the application pool that the sync service belongs to use .NET Framework 2.0."

    Is it compulsory for to ListService sample run under .NET Framework 2.0 because it does not work for me.

    2011年3月31日 13:45

答案

  • Hi FireArms,

    "Class not registered" means you did not install the right verion of Sync Framework 2.1 SDK/components. Please follow the instruction below to install the right version of sync framework 2.1 SDK/components.

    Step 1: Install Sync Framework 2.1. Sync Framework 4.0 CTP is built on top of Sync Framework 2.1. Therefore, you must install Sync Framework 2.1 prior to installing this CTP.

    • If your computer is running x86 based version of Windows operation system, install only 86 version of Sync Framework 2.1 SDK using SyncSDK-v2.1-x86-ENU.msi file.
    • If your computer is running x64 based version of Windows operation system, follow these steps:

      • First install x64 version of Sync Framework 2.1 SDK using SyncSDK-v2.1-x64-ENU.msi file.
      • If you are using Visual Studio to develop and test synchronization services on this computer, you will also need to download and run the following two x86 redistributable packages of 2.1 from Sync Framework 2.1 Redistributable Packages((Synchronization-v2.1-x86-ENU.msi, DatabaseProviders-v3.1-x86-ENU.msi). The reason is that Visual Studio always runs in x86 mode and it needs the following 32-bit Sync Framework components when you test the service using Visual Studio.

    Thanks,
    Nina


    This posting is provided "AS IS" with no warranti
    2011年4月1日 0:45
    所有者:

全部回复

  • One more update:

    I used user name as "r" when I logged in from HTML5Sample running on localhost, then I get above error. But when I give new username then I get following error:

    [Sync Error]:Error occurs during sync. Please check logs below.
    [Download Change Response Error]: 500 Response: <ServiceError xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Synchronization.Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ErrorDescription>Microsoft.Synchronization.SyncException&#xD; Retrieving the COM class factory for component with CLSID {EC413D66-6221-4EBB-AC55-4900FB321011} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).&#xD; at Microsoft.Synchronization.SyncIdFormatGroup.get_ProviderSyncServices()&#xD; at Microsoft.Synchronization.SyncSessionContext..ctor(SyncIdFormatGroup idFormats, SyncCallbacks callbacks)&#xD; at Microsoft.Synchronization.Services.SqlProvider.SqlSyncProviderService.GetChanges(Byte[] clientKnowledgeBlob)&#xD; at Microsoft.Synchronization.Services.DownloadChangesRequestProcessor.ProcessRequest(Request incomingRequest)&#xD; at Microsoft.Synchronization.Services.SyncService`1.ProcessRequestForMessage(Stream messageBody)&#xD; &#xD; System.Runtime.InteropServices.COMException&#xD; Retrieving the COM class factory for component with CLSID {EC413D66-6221-4EBB-AC55-4900FB321011} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).&#xD; at Microsoft.Synchronization.SyncIdFormatGroup.get_ProviderSyncServices()&#xD; &#xD; &#xD; </ErrorDescription></ServiceError>
    [Download Change Request]:/ListService/DefaultScopeSyncService.svc/defaultscope/DownloadChanges?userid=6c610552-c3e3-4665-98d2-97b28ba2f6f7
    {"d":{"__sync":{"moreChangesAvailable":false,"serverBlob":null},"results":[]}}
    [Login]:User Info
    {"name":"ras","id":"6c610552-c3e3-4665-98d2-97b28ba2f6f7"}
    [Login]:Login from /ListService/Login.ashx?username=ras
    2011年3月31日 14:29
  • Hello,

    There is already a sperate thread regarding "Class not registered" http://social.msdn.microsoft.com/Forums/en-US/synclab/thread/7be9ef14-d376-430c-b966-ae080ea0e4d1, could you please follow the thread to see if it is fixing your issue.

    2011年3月31日 17:47
  • Hi FireArms,

    "Class not registered" means you did not install the right verion of Sync Framework 2.1 SDK/components. Please follow the instruction below to install the right version of sync framework 2.1 SDK/components.

    Step 1: Install Sync Framework 2.1. Sync Framework 4.0 CTP is built on top of Sync Framework 2.1. Therefore, you must install Sync Framework 2.1 prior to installing this CTP.

    • If your computer is running x86 based version of Windows operation system, install only 86 version of Sync Framework 2.1 SDK using SyncSDK-v2.1-x86-ENU.msi file.
    • If your computer is running x64 based version of Windows operation system, follow these steps:

      • First install x64 version of Sync Framework 2.1 SDK using SyncSDK-v2.1-x64-ENU.msi file.
      • If you are using Visual Studio to develop and test synchronization services on this computer, you will also need to download and run the following two x86 redistributable packages of 2.1 from Sync Framework 2.1 Redistributable Packages((Synchronization-v2.1-x86-ENU.msi, DatabaseProviders-v3.1-x86-ENU.msi). The reason is that Visual Studio always runs in x86 mode and it needs the following 32-bit Sync Framework components when you test the service using Visual Studio.

    Thanks,
    Nina


    This posting is provided "AS IS" with no warranti
    2011年4月1日 0:45
    所有者:
  • Thanks Nina for the help. I had installed 32 bit version of Sync Framework 2.1 SDK. Installation was successful for me so I thought things are working fine until I get the error I posted above.

    I removed total Microsoft Sync Framework 4.0 (CTP) and installed freshly as mentioned in above steps. That worked for me.

    Thanks again Nina for help.

    2011年4月7日 6:07
  • I've had the same problem.

    It happened because Login.ashx did not return a valid GUID. This happened because it failed to estabilish a connection with the database.

    According to the documentation, you should add db_owner roles on the listdb to NT AUTHORITY\NETWORK SERVICE, but IIS was trying to connect with the user called 'IIS APPPOOL\DefaultAppPool', so I added it rights and it is working now.

    2012年3月2日 12:16