Win32Exception: The wait operation timed out. in asp.net core
How to fix: An unhandled exception occurred while processing the request.
Win32Exception: The wait operation timed out.
Unknown location
SqlException: Execution Timeout Expired.
Solution:
in file ... \Program.cs add below lines
builder.Services.AddDbContext
{
// options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection"));
options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection"),op=>op.CommandTimeout(999));
});
By Junaid A 01-Dec-2023 2