OrchardCMS / OrchardDoc

Documentation for Orchard 1.x (not Orchard Core, for that see https://docs.orchardcore.net/).
http://docs.orchardproject.net
142 stars 242 forks source link

INotifier will prevent pages loading during another page is submitting #327

Closed kcaoca closed 7 years ago

kcaoca commented 7 years ago

The issue was found in my Orchard 1.8 and it's still there on 1.10. My scenario is:

Say my HomeController is defined as below: public class HomeController : Controller { private readonly INotifier _notifier; public Localizer T { get; set; } public HomeController(INotifier notif) { _notifier = notif; } [Themed] public ActionResult Index() { return View(); } [HttpPost] public ActionResult Index(FormCollection form) { string disp = "aaaa"; Thread.Sleep(6000); if (!string.IsNullOrEmpty(form["aaa"])) disp = form["aaa"]; _notifier.Error(T(disp)); return RedirectToAction("Index"); } }

When I open browser A to submit the page, during the submitting (6 seconds), I open another browser B to load the same page simultaneously, It works fine.

After the page is submitted, a notification will appear. Then I submit the page again in browser A. During the submitting, however, browser B will not be able to open the page simultaneously but have to wait until the submitting finished. And this situation will stay there until IIS is restarted.

My observation is, once the INotifier is loaded, all the pages loading will have to wait until any page submitting finished. Please advise.

Many thanks.

agriffard commented 7 years ago

Please submit your issue in https://github.com/OrchardCMS/Orchard/issues . This is the documentation repository.