NServiceBus序列化问题

问题描述 投票:0回答:1

我在尝试从控制台托管端点使用NServiceBus DataBus时遇到此问题

Type 'NServiceBus.DataBusProperty`1[System.Byte[]]' implements ISerializable but cannot be serialized using the ISerializable interface because the current application is not fully trusted and ISerializable can expose secure data.
To fix this error either change the environment to be fully trusted, change the application to not deserialize the type, add JsonObjectAttribute to the type or change the JsonSerializer setting ContractResolver to use a new DefaultContractResolver with IgnoreSerializableInterface set to true.
Path ''.

相同的代码可从网络应用程序正常运行。将一次安全设置设置为完全信任将导致调试问题

c# serialization json.net nservicebus
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.