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: 80 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:













create user problem...

is aspnetdb.mdf sufficient for creating an application

login error

how to display passwordanswer?

login problem

techniques using shared ssl...advise me please

accessing network drives (me crazy)

profiles

is it possible to use activedirectorymembershipprovider and sqlmembershipprovider in single aplication

possible to store a private key/password string in my application?

wsat problems

what classes should i inherit/implement if i use sql server 2000 ?

master page details not displaying on login page

how to enforce password uniqueness (verify against list of previous passwords)

impersonation

authentication using ssl certificate

using formsauthentication in classic asp

posting https data

login bar

forms authentication across multiple websites

invalid access to memory location

all my asp.net apps do not work after i make my w2k server a doamin controller!

access is denied when trying to download a file

encryption of hidden fields while using ssl

can i access the admin tool provided by website->asp.net configuration after i deploy my website?

redirect after login?

different authetication method for subfolders?

file copy in webmethod

how to authorization users?

how does role-based authentication work on sub folders?

trying to use web.config for connection strings

memebershipuser and inheritance

how zealous should i be in checking for control parameter manipulation during postback?

how to avoid the current user becoming registered user after registration

can i share a session with perl running on solaris/apache

security exception

question about authentication timeout if user is not using the web app for a certain time

asp.net web admin with custom provider

asp.net 2.0 security

asp.net 2.0 logon failure: unknown user name or bad password with activedirectorymembershipprovider

authentication: protected page is not protected

login view control

form authentication

captcha && email verification

using xml instead of sql database

granting users access based on ad group membership

problem redirecting user based on user role

preventing direct downloads

create user wizard

disable non alpha-numeric requirement for passwords

   
  Privacy | Contact Us
All Times Are GMT