Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. Wcf reading stream fails when network connection is lost

Wcf reading stream fails when network connection is lost

Scheduled Pinned Locked Moved WCF and WF
csharpwcfsysadminhelp
2 Posts 2 Posters 17 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 8749214
    wrote on last edited by
    #1

    I am sending large file stream from client to wcf service using tranfer mode as stream with basichttpbinding. During streaming, if the client loses the network connection , client gets socket timeout exception. But WCF service continues to wait for the stream until the timeout specified. When the network resumes and next call is made to wcf service from the client, we observe that wcf has not released the previous process and still waiting for the previous response. Timeouts specified in client and wcf service is as below opentimeout, closetimeout, sendtimeout, receivetimeout is set to 12 hours. The file is not released upto 12 hours. Is there any method where we while during reading the stream from wcf, if client is disconnected, terminate the process. I have been struggling from the past 2 days. Please help

    A 1 Reply Last reply
    0
    • U User 8749214

      I am sending large file stream from client to wcf service using tranfer mode as stream with basichttpbinding. During streaming, if the client loses the network connection , client gets socket timeout exception. But WCF service continues to wait for the stream until the timeout specified. When the network resumes and next call is made to wcf service from the client, we observe that wcf has not released the previous process and still waiting for the previous response. Timeouts specified in client and wcf service is as below opentimeout, closetimeout, sendtimeout, receivetimeout is set to 12 hours. The file is not released upto 12 hours. Is there any method where we while during reading the stream from wcf, if client is disconnected, terminate the process. I have been struggling from the past 2 days. Please help

      A Offline
      A Offline
      Abhipal Singh
      wrote on last edited by
      #2

      Your timeouts are very large values (12 hours!!!) This is making the web service stall and keep waiting for a very long time (because you asked it to wait by setting timeouts to 12 hrs) You need to change these timeouts to few minutes(1 minute should be enough) at max as timeouts in hours does not make any sense. Read more about timeouts in below link to get a better understanding of them: https://msdn.microsoft.com/en-us/library/hh924831(v=vs.110).aspx[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups