No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
System.Web
.gitattributes
.gitignore
LICENSE
README.md
Solid.Extensions.System.Web.sln

README.md

Solid.Extensions.System.Web License solidsoftworks MyGet Build Status

Solid.Extensions.System.Web is a library for patching HttpContext.Current to be more async friendly. This library is built for .Net Framework 4.6.1 and above.

Disclaimer

We do not recommended using this library in any new applications. You should always try to have your stack be fully async instead of using Task.Run or any other variation of that within sync methods.

If you are, however, up against the wall and have a sync stack already and need to use async methods, you can try this library out and see if it works for you.

Requirements

This is written for ASP.Net applications. This is not for AspNetCore applications.

How to use

Installation

Just reference the library. When the ASP.Net application starts, it will patch HttpContext.Current for you.

Usage

public string GetString()
{
    HttpContext.Items["Hello"] = "World";
    return HttpContext.Current.Run(() => GetStringAsync());
}

private async Task<string> GetStringAsync()
{
    return $"Hello {HttpContext.Current.Items["Hello"]}";
}