locked
Sync from blob to local generet the exception "Absolute Path Not Supported" when i debug it using F5 RRS feed

  • Question

  • hi i have downloaded the project from http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sync&ReleaseId=3638 and i have changed the direction of syn from blob to local using

     SyncOrchestrator orchestrator = new SyncOrchestrator();
                        orchestrator.LocalProvider =fileSyncProvider;
                        orchestrator.RemoteProvider = azureProvider;
                        orchestrator.Direction = SyncDirectionOrder.Download;
                        orchestrator.Synchronize();

    And now when i debug it using F5 then Exception ( "Absolute Path Not Supported" ) come from the property. and when i run it using ctrl+F5 then no exception come.

    I have also convert this code in web based application i just make three classes same as it is in sample code AzureBlobSyncProvider.cs, AzureBlobStore.cs, FileRetriever.cs and from AzureSyncConsoleApp.cs i have copy the code and paste against the load event of the page but i am getting same exception.

    Plz help me .
    Regards,
    zafar
    Tuesday, February 2, 2010 6:17 AM

Answers

  • I think I got what went on.

    1. If in the Visual Studio IDE, you clear all the check boxes for "Thrown" in the "Exception" dialog from the menu Debug->Exceptions, you won't see this exception raised when pressing F5.

    2. When all check boxes were all selected in the "Thrown" of the "Absolute Path Not Supported" exception is raised from retrieving the property [AbsoluteSourceFilePath] in FileRetriever.cs during sync.  I think it is valid to throw this exception because there is no absolute path of a file on a blob storage.

    Hopefully these help.

    Thanks.


    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, February 10, 2010 6:01 PM
    Answerer

All replies

  • Hello Zafar - Would you please provide

    1. The callstack on the exception when pressing F5 (start debugging) and seeing Exception ("Absolute Path Not Supported").

    2. The input parameters to the console App?

    Thanks.
    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Tuesday, February 9, 2010 12:19 AM
    Answerer
  • after executing the line  Console.WriteLine("Creating File: {0}...", args.NewFileData.Name); in the DownloadingFile method the code goes to RelativeDirectoryPath property then it executes FileData property and after this it executes AbsoluteSourceFilePath property which throws exception.

    The input parameters to the console App are:
    _localPathName=  @"C:\assets";
    _containerName="photogallery";

    Regards,
    zafar
    Tuesday, February 9, 2010 9:27 AM
  • Zafar the problem is in your _localPathName variable.  When entering local paths you for every '\' you should write and extra '\'.  Your code should work make the following change

    from:
           _localPathName=  @"C:\assets";

    to:
           _localPathName=  @"C:\\assets";

    Maria del Mar Alvarez Rohena Microsoft Sync Framework
    Tuesday, February 9, 2010 4:40 PM
  • Hi thanx
     But if this exception come due to incorrect local path then why it is not come when i run it using ctrl+F5. When i run it using ctrl+F5 no exception come and successfully sync completed.

    Regards,
    zafar.
    Wednesday, February 10, 2010 5:07 AM
  • if adding an extra "\" does not help you to get rid of the exception when pressing F5, please print the exception call stack.

    Did you modify the Azure blob provider or store?

    Thanks.
    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, February 10, 2010 8:25 AM
    Answerer
  • Hi i have not done any modification in the azure blob provider and store.

    and what do u mean by exception call stack?

    You can get the exception if you will run this sample using F5 not by using command prompt.

    Regards,
    zafar
    Wednesday, February 10, 2010 11:35 AM
  • I think I got what went on.

    1. If in the Visual Studio IDE, you clear all the check boxes for "Thrown" in the "Exception" dialog from the menu Debug->Exceptions, you won't see this exception raised when pressing F5.

    2. When all check boxes were all selected in the "Thrown" of the "Absolute Path Not Supported" exception is raised from retrieving the property [AbsoluteSourceFilePath] in FileRetriever.cs during sync.  I think it is valid to throw this exception because there is no absolute path of a file on a blob storage.

    Hopefully these help.

    Thanks.


    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, February 10, 2010 6:01 PM
    Answerer
  • Hi thanx
    Its really work.

    regards,
    zafar
    Thursday, February 11, 2010 5:59 AM