I've been working on developing a middle man application of sorts, which uploads text to a CMS backend using HTTP post requests for a series of dates (usually 7 at a time). I am using HttpWebRequest to accomplish this. It seems to work fine for the first date, but when it starts the second date I get the System.Net.WebException: The requ...
If I am on a website#1, and I enter my username/pwd for website#2 on a login page that is on website#1, and website#1, behind the scenes, makes a httpwebrequest to website#2 and posts to the login page. If I then navigate to website#2, should I be logged in?
website#2 uses formsauthentication and I call a httpHandler that is on website...
Hey,
Long story short an API I'm calling's different environments (dev/staging/uat/live) is set up by putting a host-record on the server so the live domain resolves to their other server in for the HTTP request.
The problem is that they've done this with so many different environments that we don't have enough servers to use the serve...
I'm trying to set the HttpRequestHeader for a HttpWebRequest like so:
new HttpWebRequest().Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/4.0");
But I get an exception: System.ArgumentException: This header must be modified using the appropriate property.
How should I be setting the header?
...
I've been using HttpWebRequest/HttpWebResponse lately and I'm getting encoding problems.
HttpWebResponse.CharacterSet doesn't always represent the real page encoding so I thought I could use the Content-Type meta tag.
How can I read the Content-Type meta tag if I can't even decode the response (in case of wrong CharacterSet http header...
How long is a HTTP response cached with it has no header specifying expiration?
...
I am trying to authenticate google with the following code but google sent me back to the login page again.
//STEP# 1
string loginURL = "https://www.google.com/accounts/ServiceLoginBox?service=analytics&nui=1&hl=en-US&continue=https%3A%2F%2Fwww.google.com%2Fanalytics%2Fsettings%2F%3Fet%3Dreset%26hl%3Den%26et%...
Hi everybody
I'm pulling my hairs off since two days now because I'm trying to download an image from a website using HttpWebRequest.
When I call the method "GetResponse" of that class, I get the WebException "Unable to connect to the remote server.". The inner exception is "A socket operation encountered a dead network xxx.xxx.xxx.xxx:...
I've no idea. I'm trying to get XML from a REST service on an app I'm building for Windows Phone. I always get an exception at the following line:
HttpWebResponse response = request.EndGetResponse(ar) as HttpWebResponse;
I have the following setup (ignore the bad url, it's just an example .. )
HttpWebRequest request = WebRequest.Crea...
Within my company's online application, we've set up a JSONP-based API that returns some data that is used by a bookmarklet I'm developing. Here is a quick test page I set up that hits the API URL using jQuery's $.ajax() method:
http://troy.onespot.com/static/3915/index.html
If you look at the requests using Firebug's "Net" tab (or the...
Hello,
I'm trying to upload videos in Youtube through HttpWebRequest. Everything seems to be fine when uploading following the example given in API documentation.
I see that request is being formed correctly, with content and token sent but I receive "Incomplete multipart body" as response.
Thanks Blerim
public bool YouTubeUpload()
{...
jquery.js source code is not being recognised by browser using my page.html served by Google App Engine as a http:some_request to the SDK, BUT when I load the exact same page.html into the browser directly from my local hard drive as jquery.js all works OK, it is recognized, so I know my path is OK....
In the header of my page.html I ha...
I have an application that needs to download several files in a row in succession (sometimes a few thousand). However, what ends up happening when several files need to be downloaded is I get an exception with an inner exception of type SocketException and the error code 10048 (WSAEADDRINUSE). I did some digging and basically it's beca...
I'm using glassfish 2.1.1. I've watched a mysterious http/webservice-call handling. It seams an http request is handled by two different threads.
After http basic authentication the first thread is faster. Persisting some data end, but writing response fails in glassfish internal.
The second thread fails, because it tries to persist id...
On my Win7 PC I have a couple of virtual network adaptors that are used for VMWare server.
My HttpWebRequest times out when I have these adaptors enabled. Should I really have to tell it which adaptor to bind to?
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url.AbsoluteUri + "etc.txt");
request.Time...
Ok this is my application :
An Android app to allow me to submit CokeZone codes into CokeZone.co.uk from a mobile app instead of from the website.
So I wrote this section of code to do the post logon command and then check to see if im logged in after.
Problem is - the html I get from the homepage after I send the post command is the ...
Hello,
I am attempting to return a image from a server using Silverlight 3. The server returns the Response stream like this:
context.Response.ContentType = imageFactory.ContentType
imgStream.WriteTo(context.Response.OutputStream)
imgStream.Close()
context.Response.End()
On the Silverlight client I am handling the stream like:
...
I have a rich client application that connects to a backing web service using ASP.NET web services. The underlying authentication method used for multiple requests is ASP.NET forms authentication (with the .ASPXAUTH cookie)
I am extending the client to support communication with a webservice fallback url to provide some level of redund...
Hello, I am using an open source library to connect to my webserver. I was concerned that the webserver was going extremely slow and then I tried doing a simple test in Ruby and I got these results
Ruby program: 2.11seconds for 10 HTTP
GETs
Ruby program: 18.13seconds for 100 HTTP
GETs
C# library: 20.81seconds for 10 HTT...
My requirement is downlaoding a HTTM page. Like and I am using WebRequest.Create.
But the line
HttpWebRequest request = (HttpWebRequest) WebRequest.Create("http://www.mayosoftware.com");
Is throwing an exception {"Configuration system failed to initialize"}.
I am working in a compmany. Does it due to proxy or anything? But it’s occu...