With the code below, which I copied from the MSDN, I am getting only part of
the the web-page 'MyUrl' returned (this is a synchronoues access).
My hunch is that I have to use asynchronous access, which requires the use
of IAsynchResult - besides other things.
Does anyone have or can anybody point to code for this, please?!
TIA
Dim request As HttpWebRequest = CType(WebRequest.Create(MyUrl),
HttpWebRequest)
' Set some reasonable limits on resources used by this request
request.MaximumAutomaticRedirections =12
request.MaximumResponseHeadersLength = 12
' Set credentials to use for this request.
request.Credentials = CredentialCache.DefaultCredentials
Dim response As HttpWebResponse = CType(request.GetResponse(),
HttpWebResponse,True) 3 1250
August 7, 2005
I doubt that it would make a difference being Async vs Synch. My thought
is maybe the web request is timing out before the full request is filled and
the partial request is sent back. Or maybe there is something in the
HTML|Code returned that makes it think that it is done? Hope this helps and
have a great day!
--
Joseph Bittman
Microsoft Certified Solution Developer
Web Site: http://71.39.42.23
Static IP
"PeterK" <p.*****@verizon.net> wrote in message
news:ON**************@TK2MSFTNGP14.phx.gbl... With the code below, which I copied from the MSDN, I am getting only part of the the web-page 'MyUrl' returned (this is a synchronoues access). My hunch is that I have to use asynchronous access, which requires the use of IAsynchResult - besides other things. Does anyone have or can anybody point to code for this, please?! TIA
Dim request As HttpWebRequest = CType(WebRequest.Create(MyUrl), HttpWebRequest) ' Set some reasonable limits on resources used by this request request.MaximumAutomaticRedirections =12 request.MaximumResponseHeadersLength = 12 ' Set credentials to use for this request. request.Credentials = CredentialCache.DefaultCredentials Dim response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse,True)
Yes, that helped: The URL had a wrong parameter which made it get a shorter
response.
The question that remains, though, is:"If the web request (this client)
times out, how to lengthen the timeout interval?".
In which cases would an aysnchronous connection be needed?
Thank you.
"Joseph Bittman MCSD" <Ry*********@msn.com> wrote in message
news:O3**************@TK2MSFTNGP14.phx.gbl... August 7, 2005
I doubt that it would make a difference being Async vs Synch. My
thought is maybe the web request is timing out before the full request is filled
and the partial request is sent back. Or maybe there is something in the HTML|Code returned that makes it think that it is done? Hope this helps
and have a great day!
-- Joseph Bittman Microsoft Certified Solution Developer
Web Site: http://71.39.42.23 Static IP
"PeterK" <p.*****@verizon.net> wrote in message news:ON**************@TK2MSFTNGP14.phx.gbl... With the code below, which I copied from the MSDN, I am getting only
part of the the web-page 'MyUrl' returned (this is a synchronoues access). My hunch is that I have to use asynchronous access, which requires the
use of IAsynchResult - besides other things. Does anyone have or can anybody point to code for this, please?! TIA
Dim request As HttpWebRequest = CType(WebRequest.Create(MyUrl), HttpWebRequest) ' Set some reasonable limits on resources used by this request request.MaximumAutomaticRedirections =12 request.MaximumResponseHeadersLength = 12 ' Set credentials to use for this request. request.Credentials = CredentialCache.DefaultCredentials Dim response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse,True)
> The question that remains, though, is:"If the web request (this client) times out, how to lengthen the timeout interval?".
request.Timeout = 30000 ' 30 seconds This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Carter |
last post by:
i have a treeview on a webform (.aspx). when the user selects an appropriate node on the tvw. and clicks on a link button, i'm downloading a corresponding file to the client (from the server). so far...
|
by: Danny |
last post by:
I am working on a project in which a number of client applications will be
posting xml documents as a byte array to an ASP.NET page on our web server. I
am trying to simulate the process and run...
|
by: Danny |
last post by:
I am working on a project in which a number of client applications will be
posting xml documents as a byte array to an ASP.NET page on our web server. I
am trying to simulate the process and run...
|
by: et_ck |
last post by:
Hi,
We have a web services running to facilitate our clients in performing
transactions. Below is the sample message flow:
1)
App -> WS
WS - perform transact
WS - send response
2)
|
by: PullWood |
last post by:
Strange and curious problem I'm experiencing.
I implemeted a web site asp solution IIS 5.0.
The site performe long calculations.
What's happening is the following:
if I connect through a ADSL...
| |
by: Sirix42 |
last post by:
Hi there, when I use Firefox to run my application (this involves
sending an IFRAME request to the servlet and handling the response),
there is no delay in displaying the data after each response....
|
by: Subrato |
last post by:
Hi,
I am very new to xml and I have this piece of code which I took off
a website. The situation is that on of the website, user files up a
form and it is submitted. On submission, the page should...
|
by: george585 |
last post by:
Hello!
I am new to network programming, and understand just basics. Using some sample code, and having read documentation, I managed to create a simple app in C# and VB.NET. The application is...
|
by: Tarik Monem |
last post by:
Hi Everyone,
Still a newbie with FLEX, and I've passed arrays using AJAX to FLEX before, but I've never passed links to FLEX.
Basically, this is the OUTPUT, which I wanted, but I'm given an...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |