Robel Haile
Robel Haile

Reputation: 329

Listing files from Google Drive api results in a system formatexception

I am using the Google .net client library to request data from the Google Drive API I am getting an exception on the following line.

FileList files = request.Execute();

enter image description here

My full code:

public List<Google.Apis.Drive.v3.Data.File> retrieveAllFiles()
    {
        DriveService service = GetDriveService();
        List<Google.Apis.Drive.v3.Data.File> result = new List<Google.Apis.Drive.v3.Data.File>();
        FilesResource.ListRequest request = service.Files.List();

        do
        {

                FileList files = request.Execute();

                result.AddRange(files.Files);
                request.PageToken = files.NextPageToken;

        } while (!String.IsNullOrEmpty(request.PageToken));
        return result;
    }

Can anyone help me understand what could be causing this problem

Upvotes: 2

Views: 382

Answers (1)

peleyal
peleyal

Reputation: 3512

It seems to me that your ApplicationName is invalid. You are using non English letters there.

If you can confirm that this is the issue, I'll create a bug in our tracker (https://github.com/google/google-api-dotnet-client/issues) to follow this one.

Upvotes: 2

Related Questions