asp.net - Execute async tasks in a web garden -
i have function executes async task run , return results
public bool checknetworkdrive(string drive) { var task = new task<bool>(() => { return checknetworkdrivemethod(drive); }); task.start(); //make async call check network path avoid lock in case of not exist if (task.wait(5000) && task.result) return true; return false; }
in local host works fine in webgarden not seems work , can’t figure exact reason, can or suggest alternative !
ps, check method check network path, if it’s not responding block whole code, why need fire , async wait method.
sorry inconvenience, turned out problem not parallel task in particular,i'm using window identity impersonation access network drives , somehow task seems lose impersonation after passed impersonated user task worked fine.
i found helped
Comments
Post a Comment