ramondeklein / nwebdav

.NET implementation of the WebDAV protocol
MIT License
155 stars 42 forks source link

Hangups of WebDav on NetDrive service client if accessed to files, cannot read them. #16

Closed Corak667 closed 7 years ago

Corak667 commented 7 years ago

First it hanged webdav service, then i had to terminate process and connection (i use NetDrive), on second try it sends errors: image

[11]: PROPFIND:http://127.0.0.1:801/temp:127.0.0.1:801 - Start processing
[11]: PROPFIND:http://127.0.0.1:801/temp:127.0.0.1:801 - Finished processing (70
1ms, HTTP result: 207)
[8]: GET:http://127.0.0.1:801/Cloud/unins000.exe:127.0.0.1:801 - Finished proces
sing (3511ms, HTTP result: 200)
[4]: Exception
System.ObjectDisposedException: Access to removed object is not possible.
Имя объекта: "System.Net.HttpListenerRequest".
   в System.Net.HttpListenerRequest.CheckDisposed()
   в System.Net.HttpListenerRequest.GetKnownHeader(HttpRequestHeader header)
   в NWebDav.Server.HttpListener.HttpRequest.get_RemoteEndPoint()
   в NWebDav.Server.WebDavDispatcher.<>c__DisplayClass6_0.<DispatchRequestAsync>
b__5()
   в YaR.WebDavMailRu.Log4NetAdapter.Log4NetLoggerAdapter.Log(LogLevel logLevel,
 Func`1 messageFunc, Exception exception)
   в NWebDav.Server.WebDavDispatcher.<DispatchRequestAsync>d__6.MoveNext()
--- End of tracing stack from previous position, where exception triggered.
 ---
   в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   в NWebDav.Server.WebDavDispatcher.<DispatchRequestAsync>d__6.MoveNext()
--- End of tracing stack from previous position, where exception triggered.
 ---
   в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNoti
fication(Task task)
   в YaR.WebDavMailRu.Program.<>c__DisplayClass3_0.<<DispatchHttpRequestsAsync>b
__1>d.MoveNext()
[5]: PROPFIND:http://127.0.0.1:801/temp:127.0.0.1:801 - Start processing
[3]: PROPFIND:http://127.0.0.1:801/temp:127.0.0.1:801 - Finished processing (319
ms, HTTP result: 207)

Slowly tries to download, but hangs and connection lost.

ramondeklein commented 7 years ago

Please translate to English or I need to close it...

Corak667 commented 7 years ago

Translated, sorry. So it currently hangs on NetDrive: image

"Access to removed object is not impossible" image

I'm using WebDavCloudMailRu project (https://github.com/yar229/WebDavMailRuCloud), it's forked and based on your code, so i thought it could be very related problem

yar229 commented 7 years ago

Is it the same bug? If so, maybe not WebDrive, but NetDrive?

As for WebDrive, Ramon replied here a time ago.

Tested NetDrive with NWebDav.Sample.HttpListener: I have file "/temp/raid_mark_soft.png", but can't open/copy it. Folder and file name does not matter.

[8]: PROPFIND:http://127.0.0.1:11111/temp:127.0.0.1:11111 - Start processing
[8]: <?xml version="1.0" encoding="utf-8"?>
<D:propfind xmlns:D="DAV:">
  <D:prop>
    <D:resourcetype />
    <D:getcontentlength />
    <D:creationdate />
    <D:lastaccessed />
    <D:getlastmodified />
  </D:prop>
</D:propfind>
[8]: <?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:Z="urn:schemas-microsoft-com:">
  <D:response>
    <D:href>http://127.0.0.1:11111/temp</D:href>
    <D:propstat>
      <D:prop>
        <D:resourcetype>
          <D:collection />
        </D:resourcetype>
        <D:getcontentlength />
        <D:creationdate>2017-03-10T21:20:30.574Z</D:creationdate>
        <D:lastaccessed />
        <D:getlastmodified>Fri, 10 Mar 2017 21:20:34 GMT</D:getlastmodified>
      </D:prop>
      <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
  </D:response>
  <D:response>
    <D:href>http://127.0.0.1:11111/raid_mark_soft.png</D:href>
    <D:propstat>
      <D:prop>
        <D:resourcetype />
        <D:getcontentlength>59437</D:getcontentlength>
        <D:creationdate>2017-03-10T21:20:34.792Z</D:creationdate>
        <D:lastaccessed />
        <D:getlastmodified>Fri, 10 Mar 2017 21:20:35 GMT</D:getlastmodified>
      </D:prop>
      <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
  </D:response>
</D:multistatus>
[8]: PROPFIND:http://127.0.0.1:11111/temp:127.0.0.1:11111 - Finished processing (2ms, HTTP result: 207)
[8]: PROPFIND:http://127.0.0.1:11111/raid_mark_soft.png:127.0.0.1:11111 - Start processing
[8]: <?xml version="1.0" encoding="utf-8"?>
<D:propfind xmlns:D="DAV:">
  <D:prop>
    <D:resourcetype />
    <D:getcontentlength />
    <D:creationdate />
    <D:lastaccessed />
    <D:getlastmodified />
  </D:prop>
</D:propfind>
[8]: PROPFIND:http://127.0.0.1:11111/raid_mark_soft.png:127.0.0.1:11111 - Finished processing (0ms, HTTP result: 404)
Corak667 commented 7 years ago

Not the same bug. It's really Netdrive. (Frequently mismatching protocol half-name and this program names). Used them both long time ago,

Corak667 commented 7 years ago

Seems it can be a problem with NetDrive itself, so it's better to inform their developers.

ramondeklein commented 7 years ago

I'll close this issue when it's not NWebDAV related...