You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/service-fabric/service-fabric-reliable-services-exception-serialization.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ ms.date: 03/30/2022
6
6
ms.custom: devx-track-csharp
7
7
---
8
8
# Overview
9
-
BinaryFormatter based serialization is not secure and Microsoft strongly recommends not to use BinaryFormatter for data processing. More details on the security implications can be found [here](https://docs.microsoft.com/en-us/dotnet/standard/serialization/binaryformatter-security-guide).
10
-
Service Fabric had been using BinaryFormatter for serializing Exceptions. Starting ServiceFabric v9.0, [Data Contract based serialization](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.datacontractserializer?view=net-6.0) is made available as an opt-in feature. It is strongly recommended to opt for DataContract remoting exception serializationby following the below mentioned steps.
9
+
BinaryFormatter based serialization is not secure and Microsoft strongly recommends not to use BinaryFormatter for data processing. More details on the security implications can be found [here](https://docs.microsoft.com/dotnet/standard/serialization/binaryformatter-security-guide).
10
+
Service Fabric had been using BinaryFormatter for serializing Exceptions. Starting ServiceFabric v9.0, [Data Contract based serialization](https://docs.microsoft.com/dotnet/api/system.runtime.serialization.datacontractserializer?view=net-6.0) for remoting exceptions is made available as an opt-in feature. It is strongly recommended to opt for DataContract remoting exception serializationby following the below mentioned steps.
11
11
12
12
Support for BinaryFormatter based remoting exception serialization will be deprecated in the future.
If the original exception has multiple levels of inner exceptions, then you can control the number of levels of inner exceptions to be serialized by setting `FabricTransportRemotingListenerSettings.RemotingExceptionDepth`.
82
82
83
-
2. Enable DataContract remoting exception serialization on the **Client** by using `FabricTransportRemotingSettings.ExceptionSerializationTechnique` while creating the Client Factory
83
+
2. Enable DataContract remoting exception serialization on the **Client** by using `FabricTransportRemotingSettings.ExceptionDeserializationTechnique` while creating the Client Factory
84
84
- ServiceProxyFactory creation
85
85
```csharp
86
86
varserviceProxyFactory=newServiceProxyFactory(
@@ -111,8 +111,8 @@ var actorProxyFactory = new ActorProxyFactory(
111
111
3. DataContract remoting exception serialization converts Exception to Data Transfer Object(DTO) on the service side and the DTO is converted back to Exception on the client side. Users need to register `ExceptionConvertor` for converting desired exceptions to DTO objects and vice versa.
112
112
Framework implements Convertors for the below list of the exceptions. If user service code depends on exceptions outside the below list for retry implementation, exception handling, etc., then user needs to implement and register convertors for such exceptions.
113
113
114
-
* All service fabric exceptions(derived from `FabricException`)
115
-
* SystemExceptions
114
+
* All service fabric exceptions(derived from `System.Fabric.FabricException`)
115
+
* SystemExceptions(derived from `System.SystemException`)
0 commit comments