0

I am working on a MVC .NET 4.7 web application. There is a use case when users start a time consuming process via an ajax call. Once this time consuming task has started, they might give up on it and keep navigating on the site via:

  • a MVC menu using mvcSiteMapNode s.
  • html buttons relying on ajax.

Correct me if I am wrong, the server does not allow more than 1 simultaneous request coming from the same user or session or browser? So when users click the buttons or menu while the long query is pending, the server does not start the redirection before the long time running task ends which is obviously wrong.

I have set a CancellationToken into the controller, and the html button manages to cancel the time consuming task via an ajax abort. This part (endly) works fine.

But I do not know how to deal with the mvcSiteMapNodes.

As the mvcSiteMapNode directly redirects to the controller with no JS interaction, I cannot use the ajax Abort mechanism.

Is there any way to increase this 1 concurrent call per session limitation? I suppose that rising this to 2 would be a good enough solution for me but I did not find any way to do this. I thought this server parameter would help but it actually has a different purpose:

I thought that setting a css class to the mvcSiteMapNode would have let me capture it in JS and set an onclick event, but I did not find anyway to add any class to this mvcSiteMapNode thing either.

Well, I am out of options at this point :(

A.D.
  • 1,062
  • 1
  • 13
  • 37

0 Answers0