httpwebrequest

i want to get http response of a webpage after the ajax response is loaded

usually when v get the response. the html is without the ajax response. coz it is requested latter. but i want the source of the page containing the ajax request's response. ...

Best Matched function for PHP HttpRequest Class in C#

I am developing an App where I would need to perform HTTP Request using C#. Had in been PHP, I could use the HttpRequest class. Which class or group of class is best matched for the PHP HttpRequest by which I could make GET and POST Request. ...

HttpWebRequest for ShoutCast on Windows Phone7

Hi I tring to stream shoutcast stream in my window phone 7 app I start an async HttpWebRequest like this //Init Request HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create("http://ACommonoShoutCastUrl:8000"); myHttpWebRequest.Headers["Icy-MetaData"] = "1"; myHttpWebRequest.UserAgent = "WinampMPEG/5.09"; myHttpWebRe...

How to POST Raw Data using C# HttpWebRequest

I am trying to make a POST request in which I am supposed to send Raw POST data. Which property should I modify to achieve this. Is it the HttpWebRequest.ContentType property. If, so what value should I assign to it. ...

Send ASCII string using HTTP Post

I'm currently sending image data over as a byte array. However, I wish to send it over as ASCII string. How can I send an ASCII string from client to server using HTTP POST in c#? HttpWebRequest webRequest = null; webRequest = (HttpWebRequest)HttpWebRequest.Create("http://192.168.1.2/"); webRequest.ContentType = "applicat...

C# HttpWebResponse Comet problem

Hello! 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 alternative easy way to read a comet connection? Example that doesn't work. // get ...

HttpWebRequest initializing - response never received

I am currently working on an implementation of an application for Windows Phone 7 that should retrieve the SHOUTcast stream (inspired by this question). The stream location is represented by an IP address and a port. Here is an example of a SHOUTcast stream URL: http://78.159.104.183:80 I am trying to make a HttpWebRequest to get the ...

Using WebRequest.Create inside RenderControl() for WebParts

I need to call a web service to receive a JSON object which I'll parse before rendering the content. Here's the code for the same: Dim jResponse As MessageResponseWrapper = New MessageResponseWrapper() 'Custom class to deserialize JSON Dim req As System.Net.HttpWebRequest req = System.Net.WebRequest.Create("http://some-c...

Killing HttpWebRequest object using Thread.Abort

All, I am trying to cancel two concurrent HttpWebRequests using a method similar to the code below (shown in pseudo-ish C#). The Main method creates two threads which create HttpWebRequests. If the user wishes to, they may abort the requests by clicking a button which then calls the Abort method. private Thread first; private Thread s...

Unable to load webpage after doing AJAX request

Hi, I have a page that does an AJAX request. This request can take a while to complete, sometimes over a minute. This is not an issue. During the AJAX request I am unable to load any other pages on the website. This is the same for any web browser. I understand that there are connection limits in the browser, IIS and ASP.NET - but all...

Reading the HttpStatusCode when the remote server throws an internal error

I’m trying to read the HTTP response code from a remote server but am running into some trouble when it throws an internal server error. In the following code, GetResponse() can throw a WebException when the remote machine returns an error. I’m currently catching the error and assuming it was a HttpStatusCode.InternalServerError but this...

Java HTTP PUT with Digest authentication in Java

enter code hereHi, I am trying to upload a file with Java using PUT, server does Digest authentication. I want to keep it lean, so I try to use HttpURLConnection. public void putData(String path, byte [] data) throws IOException, MalformedURLException { Authenticator.setDefault(new Authenticator() { protected PasswordAuthenticat...

Creating a software to post and manage topics in a lot of forums

Hello guys, I have had an idea. I want to create a software (desktop or web application) that have some bellow features: At beginning, I will add some forum (that I want to post topic to there) to software (to make it easier, at first the kind of forum is just vbulletin maybe) Posting topic to forum automatically (Type topic content a...

How to download only the headers with WebRequest

I’m writing some scripts to look for vulnerabilities to the padding oracle exploit in ASP.NET for which I need to look at the HttpStatusCode in the response. I’m doing this across a large number of my sites with different scenarios and performance is important. I can do this just fine with the following code: var req = (HttpWebRequest)W...

HTTP POST to a REST Service through PHP

Hi guys, I have a webservice..just say example.com. I need to do a HTTP POST to call this web service in PHP and send data to this web service. The data I'm posting is from a form so is available in variables. I have read that this might be a way to do it, but I'm not sure, so any pointers in the right direction would be appreciated. ...

How do you set a cookie for a web request in Silverlight

I want to set a cookie value for a http POST request, caqn this be done in Silverlight? If so which class should I use HttpWebRequest, WebCLient or something else? ...

Set the SecurityProtocol (Ssl3 or TLS) on the .net HttpWebRequest per request

My application (.net 3.5 sp1) uses the HttpWebRequest to communicate with different endpoints, sometimes its over HTTPS where each hosting server may have a different security protocol requirement say TLS or SSL3 or either. Generally the servers play nice and happily negotiate/fallback on what SecurityProtocol to use TLS or SSL3, but so...

How to know redirect URL

Possible Duplicate: A way to figure out redirection URL C# Issue: If we type the following url (see warning) http://migre.me/13rQa It will redirect to oooooo1.ru I like to know the redirected URL from C#. Anybody knows how to do it. P.S: These mentioned URL could be virus affected. Please use on own risk ...

Silverlight HttpWebRequest content length empty, WTF?

When I run the following code the RESTful web service receiving the request has an empty body (content length = 0) and I don't know why? If I run Fiddler whilst debugging the request executes as expected and the server receives the body, I guess I'm not configuing something for the request any ideas? var request = (HttpWebReque...

pratical challenge: retrieving cookies from this site in .Net

Hi folks, I have a pratical question here. I have to access to a site and get the cookies information to reuse it in subsequent navigation. I don't have any browser control on my side, because everything is supposed to run on a server. With some site the task is pretty easy, but there are some site that send back cookies in a way I canno...