Azure Storage exception when a string length is more than 32768 characters

前端 未结 3 1156
悲&欢浪女
悲&欢浪女 2021-01-14 06:40

My application is an ASP.NET Core 1.0 Web API. If my controller returns a small string, everything works fine. But if the string length gets longer than 32768, i\'m getting

3条回答
  •  灰色年华
    2021-01-14 07:22

    You are encountered the Azure Storage limit for the string property type (source):

    Edm.String (String) - A UTF-16-encoded value. String values may be up to 64 KB in size.

    Because UTF-16 encoded strings require 2 bytes to store an character the maximum string length is 32768 characters.

提交回复
热议问题