CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > general_asp.net.getting_started Tags:
Item Type: Date Entered: 10/10/2007 5:16:07 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 75 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
"boston_ma" <>
NewsGroup User
The operation has timed out in System.Net.WebException10/10/2007 5:16:07 PM

0

Hi,

For some reason, I always get the error Message="The operation has timed out." everytime I send out the request to the host and  the error is at count = resStream.Read(buf, 0, buf.Length); , Does anyone knows why and how do I solve this problem? Thanks

byte[] buf = new byte[8192];

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(sUrl);

HttpWebResponse response = (HttpWebResponse)request.GetResponse();Stream resStream = response.GetResponseStream();

 

do

{

count = resStream.Read(buf, 0, buf.Length);     //Error right here "The operation has timed out"

 ......

}

 

System.Net.WebException was unhandled by user code
  Message="The operation has timed out."
  Source="System"
  StackTrace:
       at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       at FinalProcess.PostRegRequest(HttpResponse res, String sUrl) in d:\WebMap7.3\FinalProcess.aspx.cs:line 371
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

"boston_ma" <>
NewsGroup User
Re: The operation has timed out in System.Net.WebException10/11/2007 12:59:19 PM

0

any one??

"Thomas Sun – M
NewsGroup User
Re: The operation has timed out in System.Net.WebException10/15/2007 9:30:04 AM

0

Hi,

Based on my understanding, you want to read the HttpWebResponse from remote server to byte []. When you run your asp.net application, you get the error message above. If I have misunderstood you, please feel free to let me know.

The code looks correctly.  There are many reasons of this issue, such as network resource or the large response.

Please try increasing the WebRequest?s Timeout property. For example, try setting Timeout to 10000.


I hope this helps.

 


Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:













check authentication in asp.net 1.1

retrieving just one variable

passing action parameter

install act

acces to path is denied!!!

migrating to asp.net

collecting data from web page

how do you call a vb.net subroutine from a textual link.

password and confirm password fields

down loading files

form validation

validator help

simple override question.

about ad-rotators

datagrid using css , does not print format

session question

creating a new row in a dataset

browser properties

question about dynamic controls.

how to show £ instead of $

simple cookie

accessing web page from remote computer

reporting ideas needed

how to use a different query if a dropdown list displays a specific value.

how to define dynamic 2d array?

type of asp page

system.io.ioexception when accessing newly created file....

refresh label with textbox values after btn click

session lost after deleting folder recursively

looking for sample code that will read / write file to a users desktop.

how can we look at the asp.net control source code?

encrypt and decrypt password

calling sub

adding pagename to a label in a usercontrol

losing viewstate on controls added during run-time?

how to check if a datatable is empty?

i've written a perfectly correct webpage in asp.net visual basic 3.0 and i can't get it to run

setting up an asp.net webpage with sql server databases problem

server error

date and time matching

logging errors to a file

sql datasources and trasaction

stack overflow error

flash mx in same page as asp.net controls

how to setup a custom one-way "bind" for a textbox

how to set imageurl equal to a string in c#

page postback problems

create and implementation of interface

format string value parameter in sql statement

problem retrieving array contents

   
  Privacy | Contact Us
All Times Are GMT