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. .NET (Core and Framework)
  4. The Operation Has time out problme while sending SMS

The Operation Has time out problme while sending SMS

Scheduled Pinned Locked Moved .NET (Core and Framework)
helpdebuggingquestion
4 Posts 3 Posters 0 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.
  • H Offline
    H Offline
    hareshdgr8
    wrote on last edited by
    #1

    while I am sending SMS it give me Error Like "The Operation has time out " and I trace that error is in this line - "objStream = sResponse.GetResponse.GetResponseStream()" Following is my Code Dim sURL As String Dim objReader As StreamReader Dim objStream As Stream Dim sResponse As WebRequest sURL = " MyAPI" sResponse = WebRequest.Create(sURL) objStream = sResponse.GetResponse.GetResponseStream() Can Any one help what is wrong I don't understand because first time it not give me that error while I am sending second time it give me that error Help Me Please... Thank You

    Haresh Prajapati

    D J 2 Replies Last reply
    0
    • H hareshdgr8

      while I am sending SMS it give me Error Like "The Operation has time out " and I trace that error is in this line - "objStream = sResponse.GetResponse.GetResponseStream()" Following is my Code Dim sURL As String Dim objReader As StreamReader Dim objStream As Stream Dim sResponse As WebRequest sURL = " MyAPI" sResponse = WebRequest.Create(sURL) objStream = sResponse.GetResponse.GetResponseStream() Can Any one help what is wrong I don't understand because first time it not give me that error while I am sending second time it give me that error Help Me Please... Thank You

      Haresh Prajapati

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      What is that URL supposed to be because what you have in there is not a URL and that's probably why your getting the timeout.

      A guide to posting questions on CodeProject

      Click this: Asking questions is a skill. Seriously, do it.
      Dave Kreskowiak

      J 1 Reply Last reply
      0
      • D Dave Kreskowiak

        What is that URL supposed to be because what you have in there is not a URL and that's probably why your getting the timeout.

        A guide to posting questions on CodeProject

        Click this: Asking questions is a skill. Seriously, do it.
        Dave Kreskowiak

        J Offline
        J Offline
        jinzai
        wrote on last edited by
        #3

        Perhaps the OP obfuscated it for posting -- since this is about an SMS. If it were not valid the second time, it would not have been valid the first time either -- and OP stated -- it worked the first time -- but not the second time.

        1 Reply Last reply
        0
        • H hareshdgr8

          while I am sending SMS it give me Error Like "The Operation has time out " and I trace that error is in this line - "objStream = sResponse.GetResponse.GetResponseStream()" Following is my Code Dim sURL As String Dim objReader As StreamReader Dim objStream As Stream Dim sResponse As WebRequest sURL = " MyAPI" sResponse = WebRequest.Create(sURL) objStream = sResponse.GetResponse.GetResponseStream() Can Any one help what is wrong I don't understand because first time it not give me that error while I am sending second time it give me that error Help Me Please... Thank You

          Haresh Prajapati

          J Offline
          J Offline
          jinzai
          wrote on last edited by
          #4

          I would advise you to examine very carefuly your use of the streams and the WebResponse -- also avoid trying to reuse them -- this is an inherently asynchronous process and trying to create an SMS bulk texting application is not what those classes are intended to do -- it is one thing to use them to mimic browser fetches, but quite another to use them statically for multiple texts. At the very least, close them and get them each time -- the Response -- are you reading to the end and closing the response?

          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