httpwebrequest

400 Bad Request HTTP Response using a WCF POST via JQuery

Having trouble getting my JQuery POST to be accepted by the WCF Service. Here's the POST from the javascript: function jqueryPost() { var url = "/LoggingTest"; $.post(url, { message: "test message" }); } This is how I'm accepting the POST, via an Interface: [OperationContract] [WebInvoke(Method = "POST", U...

How to send large text in AJAX Request using prototype?

Hi All, I have a situation where I have to send a large text in ajax request using method :POST. I have tried to do like this. new Ajax.Request(url + "?" + params, { method: 'post',postBody: {'Test':'Test'}, onSuccess: function (transport) { switch (transport.responseJSON.Status) { ...

Windows Phone 7 HTTP Upload, no AllowWriteStreamBuffering property available

I'm creating an HttpWebRequest and storing it inside of an HttpState object. When I go to set AllowWriteStreamBuffering property of the request to false, I see that no such property exists. The download counterpart, AllowReadStreamBuffering, is available. HttpState httpState = new HttpState(); httpState.request = (HttpWebRequest)HttpWeb...

Log in to Amazon seller central using .NET HttpWebRequest

I need to scrape order information from our Amazon seller central account so I am trying to access it using HttpWebRequest from a .NET forms app. I know it is not that hard to get logged in because if I open this local HTML in IE: <html> <body> <form action="https://sellercentral.amazon.co.uk/gp/sign-in/sign-in.html/ref=ag_login_lgin_my...

Timeout using HttpWebRequest to invoke self-hosted WebHttpBinding WCF REST service over SSL

Hello all, I've written an WCF-based restful web service as a Windows service and I am accessing it via raw HttpWebRequest from a console application. It works great when I set everything up for plain http. But now, I'm trying to set it up for SSL access using the ASP.NET role provider. Now when it executes request.GetResponse() and it...

HTTP Get Request in JQuery to Last.fm

I'm trying to make an HTTP Get request using JQuery, but I get an empty string as a response, so I figure I'm doing something wrong. I used the documentation from http://api.jquery.com/jQuery.get/ as a guide. My code looks like this $.get("http://www.last.fm/api/auth/?api_key=xxxkeyxxx", function(data){ window.console.log(data); ...

How can I do digest authentication with HttpWebRequest?

Various articles (1, 2) I discovered make this look easy enough: WebRequest request = HttpWebRequest.Create(url); var credentialCache = new CredentialCache(); credentialCache.Add( new Uri(url), // request url "Digest", // authentication type new NetworkCredential("user", "password") // credentials ); request.Credentials = creden...

How to pass query parameters to the EntityQuery interface

The following link passes query parameters as f:param and they get substituted in Users.page.xml, and these parameters appear as query parameters in the browse URL which we would like to not show to the end user. Is there an alternate mechanism to pass parameters to the entity query bean <rich:menuItem> <s:link value="Users" view="/...

how to make a delete / put request in python

i can make get or post request using urllib. how do i make delete and put requests? ...

LR: VUgen web_set_timeout function unrealistic?

I understand that VUGen's web_set_timeout function allows me to set a timeout value higher than the usual value (which seems to be 120 seconds). What I do not understand: Doesn't this imply that all users would have to set their browser http POST timeout config value to a new, higher value? Don't I then test with a (simulated/virtual) u...

C# Cant reuse Http connections. No KeepAlive header. HttpWebRequest.KeepAlive = true;

Ok. Here is the full code. I tried to reuse connections setting KeepAlive but it simply doesnt work. I looked in the Http messages using Feedler and Charles but all I can see is Connection: close in response. I see 600 TCP connections in wait state opened by 10 threads. Each thread run one http requst at a time. There is also bunch of ...

C# How to force reusing authenticated Http connections?

I cant make my Http connections to be reused. HttpWebRequest.KeepAlive setting makes no difference. I found this article which says that if you have NTLM authentication then use UnsafeAuthenticatedConnectionSharing = true. So I set it to true and still have same bunch of TCP connections and nothing similar to reuse.. Any thoughts? ...

gdata api not working on certain environment

I have a java app packaged as a war which uses the gdata api. It works fine on several machines except one, where all gdata calls fail. It throws AuthenticationException for each gdata request. I've taken care to ensure all the oauth credentials are set correctly and have deployed the exact war on other systems using the exact same proce...

HttpWebRequest.GetResponse: "The underlying connection was closed: An unexpected error occurred on a receive."

I've written a C# Windows service (.NET Framework 3.5, C# 3.0) that posts files & HTML form information to a remote server, and then stores the XML server response in a database. Here is the main chunk of pertinent code: HttpWebRequest request = WebRequest.Create(postUrl) as HttpWebRequest; request.ProtocolVersion = HttpVersio...

including login credentials with a WebRequest

I am trying to "behind the scenes" log myself into a website, from the VB code behind my ASP.NET website. But I am dumbfounded as to how to do this. As far as I know I should be using the WebRequest or Webclient class. That is about as much as I know. I am not sure how to use the class. I want to click a button on my website and have...

ASP.NET - Send Information to Website

I have an asp.net webpage that only contains a textbox and a button. The user submits their email address using this webpage. What I am trying to do now is take the information submitted by the user and go to another website. Where my "website/program" gives the different website the entered email address, and clicks the submit button. ...

get side effects vs. get password reset

Generally, a get request is not meant to have any side-effects. However many sites allow you to reset your password or authenticate your email/user by clicking a link embedded in the email. Since we don't want to send HTML emails and therefore cannot use a form in which the data is POSTed, we have to use a get request. However it is cons...

Whats the best Http Component which supports SOCKS and HTTPS for C#.NET

Hi , Iam coding an application which needs to do some web automation to some websites from our intranet. Some are simple web services while some will be https websites. My application needs to connect to them via socks proxies. Now httpwebrequest class does not support socks so Iam looking to code a complete HTTP wrapper using Sockets...

c# httpwebrequest getResponse() freezes and hangs my program

I was trying to use httpwebrequest to use a rest like service on a remote server and from the first execution itself, my code was hanging the program. Then I tried it as a console application to make sure it has nothing to do with the program itself but no luck! string credentialsJson = @"{""username"":""test"", ...

HttpWebRequest build a custom request?

Hi, Basically I have HttpListener to get the request from the client. Now I want to send that request with HttpWebRequest. Is there an easy way to take my raw HTTP request from HttpListener and set it all or will I have to make a parser of some sort to set it bit by bit? Thanks ...