c# - System.Web.HttpException: 'The remote host closed the connection -
while executing webdavserver.sqlstorage.aspnet , webdavserver.filesystemstorage.aspnet applications, receiving following error:
system.web.httpexception: 'the remote host closed connection. error code 0x800704cd.'
my code follows:
public async task processrequestasync(davcontextbaseasync context, ihierarchyitemasync item) { if (item iitemcollectionasync) { // in case of requests webdav folders serve web page display // information server , how use it. // remember call ensurebeforeresponsewascalledasync here if context implementation // makes useful things in beforeresponseasync. await context.ensurebeforeresponsewascalledasync(); ihttpasynchandler page = (ihttpasynchandler)system.web.compilation.buildmanager.createinstancefromvirtualpath( "~/mycustomhandlerpage.aspx", typeof(mycustomhandlerpage)); if(type.gettype("mono.runtime") != null) { page.processrequest(httpcontext.current); } else { // here call beginprocessrequest instead of processrequest start async page execution , able call registerasynctask if required. // call apm method (begin/end) tap method (task/async/await) task.fromasync must used. await task.factory.fromasync(page.beginprocessrequest, page.endprocessrequest, httpcontext.current, null); } } else { await originalhandler.processrequestasync(context, item); } }
Comments
Post a Comment