Hi,
Any ideas why on some links that I try to access using HttpWebRequest I am getting "The remote server returned an error: (304) Not Modified." in the code?
The code I'm using is from Jeff's post here.
Note the concept of the code is a simple proxy server, so I'm pointing my browser at this locally running piece of code, which gets ...
Hi,
Im still having issues using HttpWebRequest.
For some reason sometimes in my app the call just times out...
HttpWebRequest req = null;
req =
(HttpWebRequest)WebRequest.CreateDefault(new Uri(aRequest));
req.PreAuthenticate = true;
req.AllowAutoRedirect = true;
req.KeepAlive = false;
.....
resp = (HttpWebResponse)req.GetRespons...
I'm using the WebRequest object to post data to a login page, then post data to a seperate page on the same site. I am instantiating a CookieContainer and assigning it to the WebRequest object so that the cookies are handled. The problem is that I do not want to retain the cookie after I post data to the other page. How can I delete t...
Hi,
How do I mimic a WebException 304 error back to browser if I am using HttpListener?
That is I have received a request to my HttpListener, and then obtained the HttpListenerContext, then from this point how would I mimic/arrange for a HTTP "304 Not Modified" response to be effectively sent back to the browser via the HttpListenerCon...
I'm trying to ping Google when my web site's sitemap is updated but I need to know which status code does Google or any other service returns. My code is below:
HttpWebRequest rqst = (HttpWebRequest)WebRequest.Create("http://search.yahooapis.com/ping?sitemap=http%3a%2f%2fhasangursoy.com.tr%2fsitemap.xml");
rqst.Method = "POST";
rqst.Con...
Hello community,
I don't know how can I add array parameters in a post request.
Until now I only needed something like method=method.name¶m1=1....
My question is how can I add an Array in plain text?
...
I am trying to download a page using Silverlight 4 (http://google.com/) from a different domain than where the app is hosted. I'm simply curious if this is possible in the browser. I know I can do it out of the browser, as I tried it already, but trying it in the browser gives a security exception (understandable).
I'd like to know ...
Hi all,
users can sign up to my site and get a standard url (username.teamgeisthq.com) from where they can access their content. They can also get a cleaner domain name like www.username.nl (same as username.teamgeisthq.com) to access their information.
Google tells me that it s bad to have 2 urls pointing to the same content. i still ...
Right now I am using this code to download files (with a Range header). Most of the files are large, and it is running 99% of CPU currently as the file downloads. Is there any way that the file can be written periodically so that it does not remain in RAM constantly?
private byte[] GetWebPageContent(string url, long start, long finish)
...
When writing data to a web server, my tests show HttpWebRequest.ReadWriteTimeout is ignored, contrary to the MSDN spec. For example if I set ReadWriteTimeout to 1 (=1 msec), call myRequestStream.Write() passing in a buffer that takes 10 seconds to transfer, it transfers successfully and never times out using .NET 3.5 SP1. The same tes...
Hi
Today i came across strange problem whenever i try to pingging to my server works properly but
whenever i send http reuest from browser the request time out happens.
can anybody help me to resolve this issue.
...
I have a function that returns a website's server when you enter the url for the site:
private string GetWebServer()
{
string server = string.Empty;
//get URL
string url = txtURL.Text.Trim().ToLower();
if (!url.StartsWith("http://") && !url.StartsWith("https://"))
url = "http://" + url;
HttpWebRequest reque...
I wanted to learn a little more about web and .NET so i decided to write a program to download binaries, webpages and does a little ajax.
The first download site i tried was too easy. So i went against uploading.com. It seemed good, no captcha, some ajax use required, you cant guess all the data, it was perfect.
After 2hours of messing...
Hi All,
How do I get the parameters that are available in the request Header? When I login to a site, I need to see the values that are available in the request header.Is it possible to get that information using any Addons? Can someone please help me to find this?
Thanks in advance
...
NOTE: I fixed the user agent problem and i also added in an extra byte to match the content length. No luck however.
I dont understand this. I ran this code below and the result json string was the link is expired (meaning invalid).
However the curl code does the exact same thing and works. I either get the expected string with the url...
hi all!
I'm using the following lines of code to make an http post call
NSData *imageData = UIImageJPEGRepresentation(image, 0.9);
NSString *urlString = @"http://169.254.225.91:8888/upload.php";
// setting up the request object now
NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
[request setURL:[NSURL ...
This has been messing me up hard i have been trying to solve this problem and after writing a dummy app to check headers and pointing my code to it i notice HttpWebRequest will completely ignore my user agent when i POST data.
Why? How do i solve this?
...
I would like to know if the following is possible:
As part of the PageLoad of an ASP.Net page request:
Use HttpWebRequest (POST) to make a request to a forms authentication
webpage of a different web application
Examine the response to see if the authentication succeeded (identifiable if an authentication cookie has been set)
If it fa...
I am testing a HttpHandler that accepts XML. It works fine when a small amount of data is posted but if I post data larger then approx 29mb, I get a asp.net 404 Error.
I am posting to the handler from another handler in the same project and I have tried 2 methods -
1. HttpWebRequest with "POST"
2. WebClient with UploadFile() and UploadD...
I've decided that using a PHP proxy for AJAX calls for a project is the best way to go - but I have a question regarding passing POST data through the proxy. As in - how to do it.
Should I need to create a single variable in the javascript using alternate characters, then have the PHP proxy parse and modify the variable to reassemble...