Questions tagged [httpwebrequest]

HttpWebRequest is a concrete class for .NET Framework applications that provides an HTTP-specific implementation of the abstract WebRequest class. Related tag: [webrequest].

httpwebrequest
Filter by
Sorted by
Tagged with
0 votes
1 answer
154 views

Android: Is it possible to parse binary data AS it is coming down the network?

A while ago I worked on a parser for some binary data that parsed the data as the data was coming down the network. The important thing being that we didn't have to wait for the entire set of bytes ...
SpecialEd's user avatar
  • 495
1 vote
0 answers
293 views

I keep receiving the script say "window.location.reload()" when use httpwebrequest

<!--@R--><script> var k ='c991130d'; var d = new Date(); d.setTime(d.getTime() + (3600*24*365*5*1000)); document.cookie = "p7c=" + k +"; expires=" + d.toGMTString(); setTimeout(function()...
user1094232's user avatar
1 vote
1 answer
1k views

automatic login and file download

I am trying to download file using webbrowser class.i could login and navigate further using webbrowser. but the file is located on the website using javascript. I tried to get file using ...
Radha's user avatar
  • 21
1 vote
1 answer
1k views

use HttpWebRequest to get redirected url instead of waiting for the entire page to load

I have a page that redirects to a video (.3gp). The problem (from what i can tell) is that after begining the request from the original page, i get a very late response. I suppose this is because the ...
Alex's user avatar
  • 11k
5 votes
1 answer
2k views

HttpWebRequest slow fix by setting Proxy to null

I rectified my HttpWebRequest initial calls being slow by using the suggestion mentioned at Why is this WebRequest code slow? One of the suggestions mentioned to set the Proxy to null and things ...
TheWommies's user avatar
  • 5,012
1 vote
2 answers
617 views

Execute a WebRequest in a Background thread while UI Thread is blocked

Why does the following code executes WebRequests after 5 secs when the UI Thread isn't being blocked anymore? Thread.Sleep is in the UI Thread while both Instantiation and Invocation of WebRequests ...
djsolid's user avatar
  • 385
1 vote
1 answer
300 views

httpwebrequest, httpwebresponse not quite working

I have a windows form application which serves to login to a website and retrieve the content (html code) of a webpage. I change my code from windows form application to make it work with an .aspx ...
Tomo84's user avatar
  • 21
1 vote
2 answers
1k views

.net. Max number of async HttpWebRequest

I need process concurent requests at my application. I use this code: public class AsyncHttpHelper { public static IEnumerable<XDocument> GetPagesAsXDocuments(IEnumerable<string> uris) { ...
Andrew Kalashnikov's user avatar
0 votes
1 answer
233 views

Downloading with HttpWebRequest

Lets say that I use HttpWebRequest to call a web-service written in python and that service returns a XML file. Lets assume that it takes 10 seconds to download the data. HttpWebResponse response = (...
Gero's user avatar
  • 13.3k
0 votes
1 answer
3k views

HttpWebRequest.GetResponse when server redirects to unknown location

I am trying to use HttpWebRequest.GetResponse where the server is making 302 redirect to another unknown location. if the redirected target is known let it be www.xyz.com so we can use a ...
Prakash's user avatar
  • 823
2 votes
2 answers
4k views

Read the Realm property in HTTP authentication [closed]

How can I read the Realm property sent in the WWW-Authenticate header by a server requesting HTTP Basic authentication?
T4mer's user avatar
  • 440
8 votes
2 answers
7k views

Is it okay to set a cookie with a HTTP GET request?

This might be a bit of an ethical question, but I'm having quite a discussion in the office about the following issue: Is it okay to set a cookie with a HTTP GET request? Because whenever a HTTP ...
Justus Romijn's user avatar
0 votes
1 answer
481 views

Error when post message from C# program with server using Twisted python

My Method to post a message to server using C# .NET 4.0 private String postHTTP(String url) { String result = ""; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); ...
chanhle's user avatar
  • 168
19 votes
3 answers
67k views

C# - HttpWebRequest POST (Login to Facebook)

I'm trying to login to Facebook in my program and parse some information from there (like name, profile pic, etc). I'm getting redirected back to Facebook's main page everytime I execute the code ...
user1086902's user avatar
22 votes
3 answers
42k views

How to set useUnsafeHeaderParsing in code

I am getting the following exception: The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF From this question: HttpWebRequestError: The server ...
Barka's user avatar
  • 8,832
0 votes
2 answers
2k views

HTTP Request GET Help?

I send this request to google.com, GET /HTTP/1.1 Host: www.google.com Connection: keep-alive Cache-Control: max-age=0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) ...
Moh's user avatar
  • 2,017
0 votes
2 answers
443 views

How to get the content of web page? [duplicate]

Possible Duplicate: Reading web page by sending username & password? My problem is this. There is a site that has data which is frequently updated that I would like to get at regular ...
Ayush's user avatar
  • 165
1 vote
0 answers
91 views

changes in response for httpresponse

I am developing an online shop for a firm which have an online business management software called simPRO. so i have to retrieve from simPRO using an API which i am provided with. Its xml based and ...
Sukhdeep Singh's user avatar
0 votes
1 answer
211 views

Remember authentication with web request

I am making a program that get's it's data from a site that needs authentication. I am making the program in a console, so I cannot use controls. I am able to send the user data to the login form and ...
Jerodev's user avatar
  • 32.8k
1 vote
1 answer
1k views

HttpWebRequest times out if Thread.CurrentThread.CurrentCulture is changed

If you change Thread.CurrentThread.CurrentCulture to something different than installed (OS culture), the call to HttpWebRequest.GetResponse() will always time out. Just for clarification, here's ...
Ales Potocnik Hahonina's user avatar
12 votes
0 answers
8k views

"Split" one request to multiple servers

Is it possible to split a request to multiple endpoint servers ? So for example: If server A receives one request it will then forward it to 3 different servers (B,C and D) which will receive that ...
shdev's user avatar
  • 1,915
0 votes
1 answer
1k views

HttpWebResponse Async The underlying connection was closed : An unexpected error occured on a send

I m using HttpWebRequest class asynchronously as code below (its just windows application) private void StartWebRequest(string url) { HttpWebRequest request = (HttpWebRequest)...
Mustafa Ekici's user avatar
1 vote
1 answer
4k views

HttpWebRequest and GetResponse hangs after 1 request; other solutions doesn't work for me

I have set up a connection to Googles C2DM system. It works - sort of. When I ask C2DM to "ping" my Android device, it does so sometimes, but far from always. The problem shows itself on the server-...
Ted's user avatar
  • 20k
0 votes
2 answers
3k views

Force application to use a specific IP address from running computer

I have a server (server A) that has several public IP addresses. I am building a desktop application that will run on server A to fetch data from another server (server B) using the httpwebrequest ...
Andres's user avatar
  • 192
-2 votes
2 answers
719 views

How do we read webpages using WP7 Mango? [closed]

I'm trying to read a web page using WP7 using the Windows Phone 7.1 SDK (Mango). I have a URL which I would like to read and later perform some function on it. I tried using HttpWebRequest and ...
Kartos's user avatar
  • 769
1 vote
2 answers
3k views

Dispatcher, BackgroundWorker or Parallel?

As part of trying to learn C#, I'm writing a small app that goes through a list of proxies. For each proxy it will create an httpwebrequest to a proxytest.php which prints generic data about a given ...
dsp_099's user avatar
  • 5,910
4 votes
1 answer
2k views

C#: How to make HttpWebRequest mimic the Web Browser control

I've used several HttpWebRequest's in the past but they've all been used to login into a site. I was wondering how does one make the WebRequest mimic a WebBrowser as in once you're logged in, ...
user1017524's user avatar
2 votes
1 answer
766 views

SQL CLR, HttpWebRequest, and Connection Throttling

Good day! I have inherited a fairly complex MSSQL database. Used within the code are CLR Assembly DLLs that are called from within stored procedures. Within these CLR Assembly DLLs, we are reaching ...
J.R.'s user avatar
  • 61
0 votes
1 answer
924 views

WebRequest.BeginGetResponse timeout

I use WebRequest.BeginGetResponse in order to retrieve a resource asynchronously. Is it possible using this async way to be notified if a timeout occurred for the specified resource ? HttpWebRequest ...
Ghita's user avatar
  • 4,475
1 vote
2 answers
6k views

encoding problems with HttpWebResponse

I have problems with characters encoding received from http web response, I receive ? instead é. I set the encoding to according Content-Type of web page that's text/javascript; charset=ISO-8859; ...
Jack's user avatar
  • 16.5k
1 vote
1 answer
3k views

Using the Wikimapia.org Api

I am trying to use the wikimapia api for finding venues of specific cities or places given their longitude and latidute. There isn't much of some documentation, but I suppose that it would just be an ...
pr_prog_84's user avatar
3 votes
2 answers
3k views

How do I copy a HttpRequest to another web service?

I have two identical web services currently installed on the same PC for testing purposes. A request that is received by the first service, is suposed go to the second one as well. My intention was to ...
KoturB's user avatar
  • 155
0 votes
2 answers
791 views

Multithreaded Worker Pattern

I'm not sure about the exact name of that pattern (code sample), but I'm sure it exists. I have a class which works as a client and connects to the server. I would like to run it in multithreaded. But ...
Jeffrey Rasmussen's user avatar
0 votes
3 answers
4k views

HTTP Post from Console application C#

I have web site that contains textbox and button, when enter something in the textbox and click the button the site redirect to another one. My question is how to get the redirected URL using console ...
Hala Aly's user avatar
  • 141
2 votes
1 answer
1k views

How do use HttpWebRequest to login into a website

Can some one help me figure out how to login into a page using HttpWebRequest and subsequently scrape a page. The code am using doesnt just writes out the markup on the login page but cannot login......
plasteezy's user avatar
  • 297
2 votes
1 answer
937 views

How can I process the response stream from a webpage that displays a video?

<html> <body style="background-color: rgb(38,38,38);"> <video controls="" autoplay="" name="media" style="margin: auto; position: absolute; top: 0; right: 0; ...
Imran Ahmed's user avatar
1 vote
2 answers
810 views

Login to another website and parse data

There is php page, let's call it http://www.aaaa.org/login.php which has two textboxes (name="username" and name="password") and a button. And there is my .aspx page from which I want to login to that ...
Tomo84's user avatar
  • 21
13 votes
3 answers
12k views

Is Content-MD5 field in the HTTP Response universal?

I have tried downloading files from different servers, NOT all of them respond with the Content-MD5 field in their headers. I wanted to know if that it is the standard to HTTP response without the ...
URimmovable's user avatar
4 votes
2 answers
8k views

Silverlight HttpWebRequest SecurityException

The Problem I have a restful web service that is running on a remote server. I have already made a WP7 app that uses it, so I know that it works. I am porting the application to a Silverlight web app ...
Bryan Watts's user avatar
  • 1,425
3 votes
4 answers
3k views

Winform application first web request is slow

When I first make a HttpWebRequest in a Winform App, it takes 10~30 seconds to process the first request. Subsequent calls takes less than a second. I wrote a little POC app to exemplify this, it ...
tcbrazil's user avatar
  • 1,325
15 votes
2 answers
25k views

Send POST with WebClient.DownloadString in C#

I know there are a lot of questions about sending HTTP POST requests with C#, but I'm looking for a method that uses WebClient rather than HttpWebRequest. Is this possible? It'd be nice because the ...
PorkWaffles's user avatar
1 vote
3 answers
3k views

HttpWebRequest Operation Timeout with CookieContainer

When I am using HttpWebRequest and add this: CookieContainer container = new CookieContainer(); request.CookieContainer = container; it will throw an Operation Timeout exception in HttpWebResponse ...
Johnsea's user avatar
  • 135
3 votes
4 answers
45k views

Create a SSL WebRequest with C#

I'm making a code that reads the a page and downloads it contents programmatically, but it does not work same way as a browser. Note that I'm also using cookies string. my code is: string strUrl = "...
Alexei's user avatar
  • 1,309
-5 votes
2 answers
7k views

HttpWebRequest, c# and Https

I have tried many ways to login to an https website programmatically, but I am having issues. Every time I get an error stating that my login and password are incorrect. I am sure they are correct ...
jars's user avatar
  • 49
0 votes
2 answers
3k views

How to make a POST request to the Windows phone 7?

How to send data to authenticate to the server? Using the current code: WebClient MyWebClient = new WebClient(); MyWebClient.OpenWriteCompleted += new OpenWriteCompletedEventHandler(...
arsenium's user avatar
  • 571
16 votes
1 answer
26k views

HttpWebRequest: how to identify as a browser?

The question is how to construct HttpWebRequest so queried server will think it comes from a browser?
rotman's user avatar
  • 1,631
0 votes
1 answer
107 views

Form submission via jquery excludes a field

So... currently, the form submission looks like this: suggested_text is empty. but I use jquery to set the textarea when the form is done loading. So... even if the rich text editor didn't work at ...
NullVoxPopuli's user avatar
1 vote
1 answer
13k views

WebRequest follow redirect

I have a page (url a) which submits a form programmatically using a WebRequest. The page that accepts the form request does a bunch of stuff and then redirects to another page (url b) Is it ...
dan richardson's user avatar
1 vote
2 answers
5k views

C# HttpWebRequest returning 500 Internal Error

I would like to know why my HTTP Request returned an 500 Server Internal Error on the Response. I use this C# Code HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://svabyss.66ghz.com/...
Aditya Avaga Purwa's user avatar
9 votes
3 answers
5k views

Single instance of a class per HTTP request

To debug my ASP.NET application I created a class called MessageHandling.cs. At this point it's a singleton pattern but I want it to be an instance per request. My mssqlDb class fills the ...
h3rj4n's user avatar
  • 155

1
77 78
79
80 81
112