Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update NotSupportedException for BinaryFormatter (de)serialize #8992

Merged
merged 6 commits into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</Attributes>
<Docs>
<summary>Serializes and deserializes an object, or an entire graph of connected objects, in binary format.</summary>
<remarks>Warning: BinaryFormatter is insecure and can't be made secure. For more information, see the <see href="/dotnet/standard/serialization/binaryformatter-security-guide">BinaryFormatter security guide</see> and <see href="/previous-versions/dotnet/fundamentals/serialization/binary/system-runtime-serialization-formatters-binary-binaryformatter">System.Runtime.Serialization.Formatters.Binary.BinaryFormatter class</see>.</remarks>
<remarks>Warning: BinaryFormatter is insecure and can't be made secure. For more information, see the <see href="/dotnet/standard/serialization/binaryformatter-security-guide">BinaryFormatter security guide</see>. The in-box implementation of BinaryFormatter was removed in .NET 9. For more information, see <see href="/dotnet/standard/serialization/binaryformatter-migration-guide/">BinaryFormatter migration guide</see>.</remarks>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
Expand Down Expand Up @@ -132,7 +132,6 @@ This constructor sets the properties of the <xref:System.Runtime.Serialization.F
|-------------------|---------------|
|<xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.SurrogateSelector%2A>|`null`|
|<xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Context%2A>|A <xref:System.Runtime.Serialization.StreamingContext> with a value that indicates that serialized data can be transmitted to or received from any of the other contexts. (<xref:System.Runtime.Serialization.StreamingContextStates.All?displayProperty=nameWithType>)|

]]></format>
</remarks>
</Docs>
Expand Down Expand Up @@ -460,7 +459,8 @@ An error occurred while deserializing an object from the input stream.

The <see langword="InnerException" /> property may contain more information about the root cause.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<exception cref="T:System.NotSupportedException">ASP.NET Core 5 and later: Always thrown unless <see cref="T:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter" /> functionality is re-enabled in the project file. For more information, see <see href="https://aka.ms/binaryformatter">Resolving BinaryFormatter obsoletion and disablement errors</see>.</exception>
<exception cref="T:System.NotSupportedException">ASP.NET Core 5-8: Always thrown unless <see cref="T:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter" /> functionality is re-enabled in the project file. For more information, see <see href="https://aka.ms/binaryformatter">Resolving BinaryFormatter obsoletion and disablement errors</see>.</exception>
<exception cref="T:System.PlatformNotSupportedException">.NET 9 and later versions: In all cases. For more information, see <see href="https://learn.microsoft.com/dotnet/standard/serialization/binaryformatter-migration-guide/">BinaryFormatter migration guide</see>.</exception>
</Docs>
</Member>
<Member MemberName="Deserialize">
Expand Down Expand Up @@ -635,7 +635,6 @@ For deserialization to succeed, the current position in the stream must be at th

]]></format>
</remarks>
<related type="Article" href="https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/5dxse167(v=vs.100)">Automatic Deserialization in .NET Framework Remoting</related>
</Docs>
</Member>
<MemberGroup MemberName="Serialize">
Expand Down Expand Up @@ -730,7 +729,8 @@ For deserialization to succeed, the current position in the stream must be at th
The <paramref name="graph" /> is null.</exception>
<exception cref="T:System.Runtime.Serialization.SerializationException">An error has occurred during serialization, such as if an object in the <paramref name="graph" /> parameter is not marked as serializable.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<exception cref="T:System.NotSupportedException">ASP.NET Core 5 and later: Always thrown unless <see cref="T:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter" /> functionality is re-enabled in the project file. For more information, see <see href="https://aka.ms/binaryformatter">Resolving BinaryFormatter obsoletion and disablement errors</see>.</exception>
<exception cref="T:System.NotSupportedException">ASP.NET Core 5-8: Always thrown unless <see cref="T:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter" /> functionality is re-enabled in the project file. For more information, see <see href="https://aka.ms/binaryformatter">Resolving BinaryFormatter obsoletion and disablement errors</see>.</exception>
<exception cref="T:System.PlatformNotSupportedException">.NET 9 and later versions: In all cases. For more information, see <see href="https://learn.microsoft.com/dotnet/standard/serialization/binaryformatter-migration-guide/">BinaryFormatter migration guide</see>.</exception>
</Docs>
</Member>
<Member MemberName="Serialize">
Expand Down