Questions tagged [httpwebresponse]

Provides an HTTP-specific implementation of the WebResponse class

The HttpWebRequest class provides support for the properties and methods defined in the WebRequest class and for additional properties and methods that enable the user to interact directly with servers using HTTP.

1062 questions
8
votes
2 answers

Using .NET to Post a file to Server HttpWebRequest or WebClient

Okay so here is the deal. As the question states, I'm trying to POST a file to a webserver and am having a few issues. I've tried posting this same file to the same webserver using Curl.exe and have had no issues. I've posted the flags I used with…
Myishmael
  • 113
  • 1
  • 5
8
votes
1 answer

HttpWebResponse

I want to download images from the server. When the image doesn't exist, I want to show my default image. Here's my code: string url = "http://www......d_common_conference" + "/" + c.id_common_conference + "-MDC.jpg"; try { HttpWebRequest…
user1855271
  • 81
  • 1
  • 2
8
votes
8 answers

How to login to wordpress programmatically?

I need to perform some action in wordpress admin panel programmatically but can't manage how to login to Wordpress using C# and HttpWebRequest. Here is what I do: private void button1_Click(object sender, EventArgs e) { string…
T-Rex
  • 874
  • 1
  • 6
  • 20
7
votes
2 answers

How can I convert a byte[] response to a valid XDocument?

cxmHM NNy6VNpiAA http://imgur.com/cxmHM.png
Sergio Tapia
  • 40,006
  • 76
  • 183
  • 254
7
votes
1 answer

Segmented C# file downloader

Have been trying to write a program in C# that downloads a file using multiple segments at once like most download managers, and I've run into the issue that the files downloaded are corrupted. E.g., I download a video and it plays for 2 seconds…
James
  • 489
  • 1
  • 5
  • 15
7
votes
4 answers

HttpWebRequest stops working suddenly, No response received after few requests

I’m working with a WPF .net 4.0 Application. I have a search bar. For each search token I need to do 8 http request to 8 separate URLs to get search results. I send 8 requests to server after 400 milliseconds once the user stops typing in search…
Somnath
  • 3,247
  • 4
  • 28
  • 42
7
votes
2 answers

File transfer over HTTP

As far as I know it is possible to transfer binary files over HTTP protocol. But HTTP is a text-based protocol, the typical HTTP response frame looks as follows: HTTP/1.1 200 OK Date: Wed, 23 May 2012 22:38:34 GMT Content-Length: 438 Content-Type:…
Marc Andreson
  • 3,405
  • 5
  • 35
  • 51
6
votes
3 answers

Keep trying to talk to server when the Internet is down

So my application is exchanging request/responses with a server (no problems), until the internet connection dies for a couple of seconds, then comes back. Then a code like this: response = (HttpWebResponse)request.GetResponse(); will throw an…
Alex
  • 7,432
  • 20
  • 75
  • 118
6
votes
1 answer

Why is HttpWebResponse losing data?

In another question, people are getting incomplete data when reading from a HttpWebResponse via GetResponseStream(). I too encountered this problem when reading data from an embedded device which should send me the configuration of 1000 inputs, all…
Manuel R.
  • 63
  • 4
6
votes
1 answer

C# HttpWebResponse Comet problem

I am wondering how I would go about reading a persistent connection with HttpWebRequest and HttpWebResponse. The problem seems to be that the GetResponseStream() function waits for the server connection to be closed before returning. Is there an…
Kosaki
  • 103
  • 1
  • 4
6
votes
1 answer

HttpWebRequest Vs webclient class who is better

Possible Duplicate: WebClient vs. HttpWebRequest/HttpWebResponse I can't guess who is better HttpWebRequest or webclient Can you suggest me which one is better in terms of performance
anirudha Gupta
6
votes
3 answers

This stream does not support seek operations. HttpWebResponse

I'm making a program which downloads files over http. I've got it downloading, however I want to be able to pause the downloads, close the program and resume them again at a later date. I know the location i'm downloading them from supports…
JFoulkes
6
votes
2 answers

Could not post on WebRequest if the Content Length > 7kb using C#

I am trying to post a Json to our web service. My problem is that when my request.ContentLength exceeds 7kb. I will get a web exception 500 at request.GetResponse(). But if my request.ContentLength is below 7kb, my post is successfully sent. Error…
5
votes
3 answers

Can I get the IP address of my users in a SvelteKit project?

I'm interested in capturing the Internet Protocol (IP) address of my users at their initial submit to my website. I was under the impression that a SvelteKit submit would be similar to other node.js server solution. I've been all over this posting,…
zipzit
  • 3,778
  • 4
  • 35
  • 63
5
votes
1 answer

HttpWebRequest and WebResponse.GetResponse give incomplete response

I'm pretty RESTless right now because I keep getting incomplete responses from Amazon. I'm using the Product Advertising API, making one ItemLookup request to the server. The C# code is pretty basic: HttpWebRequest request =…
spiderman
  • 151
  • 2
  • 9