Skip to content

Timeout.InfiniteTimeSpan not supported. #25068

Closed

Description

Include your code

Calling SetCommandTimeout with the Infinite timespan throws the error:

System.ArgumentException: Timeout must be greater than or equal to zero.

Code:

Context.Database.SetCommandTimeout(Timeout.InfiniteTimeSpan);

Include provider and version information

EF Core version: 5.x
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: Net5.0
Operating system: Windows
IDE: Visual Studio 2019 16.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions