Q:

Is there a way to send more than 65kb as Cloud-To-Device message in Azure IoT Hub?

I've met an issue with IoT Hub - I should send a large object from cloud to device.
I've tried to send a text file from my drive.
If I send the file with size below 65kb - all is OK. But if the size is larger than 65kb - Device Console application can't receive this data (I've tested on C++ and C# clients)
Code for sending data:
private static async Task SendCloudToDeviceLargeDataAsync(string deviceId)
    {
        var bytes = File.ReadAllBytes(filePath);

        var message = new Message(bytes)
        {
            //Acknowledgement for message delivery feedback
            Ack = DeliveryAcknowledgement.Full
        };

        await serviceClient.SendAsync(deviceId, message);
    }

Is there any way to send large amount of data from IoT Hub to Device?

A:

There is no way you can do this.
As stated https://github.com/Azure/azure-content/blob/master/includes/iot-hub-limits.md here, the maximum size of a cloud to device message is 64KB.
There are other alternatives you can look into though, one of the things we commonly do is upload the data required to blob storage and send the device the address of the uploaded item. This has the advantage of separating our message content from our message layer, and allows us to maintain some governance over the data which has been sent - very handy for debugging.
Hope this helps.

