Questions tagged [webresponse]

135 questions
1
vote
1 answer

WebResponse Timeout

I'm writing a program that reads data from a series of web pages; this works for the first page, however it then hangs while waiting for a response from the next page until it times out. Whether I start by reading page 1, 2, 140, etc. it will always…
user1959309
  • 101
  • 1
  • 11
1
vote
0 answers

Protocol violation on C#, attempting to connect to SHOUTCast

I am making a program on Visual C#, attempting to connect to a Shoutcast radio and download the audio. However, I get a protocol violation error on the GetResponse() function. I've heard that Shoutcast is not a common HTTP protocol, and I didn't…
1
vote
2 answers

C# fastest way to make a request & read response

i was wondering whats the fastest way to make a request and get a response into a string? I read that webclient is basically a helper class for httpwebrequest. The reason im asking is that for instance, i need to get response from like 2000…
user3603865
  • 57
  • 1
  • 8
1
vote
1 answer

Windows 8 phone Check if URL is valid and working, does not have definition

I would like to check to see if URL given by the user is valid or not. Because if it is not, for example "http://www.stackoverflow" then it will crash the program later. I have tried to use the Web Response but it cannot find a definition for…
user3795349
  • 314
  • 2
  • 16
1
vote
1 answer

System.Net.WebException: The operation has timed out at System.Net.HttpWebRequest.GetResponse

I'm trying to navigate some webpages but sometimes I receive "the operation has timed out" error.. sometimes it works days without any error.. After received the error, if I try to navigate from WebBrowser, it navigate without any problem, but if I…
1
vote
1 answer

Issue with StreamReader

I am writing code where I am trying to grab the HTML from a DNS report online (http://viewdns.info/dnsreport/?domain=google.com), but I am having some issues. The one line of the HTML file (Line 231) that I actually need is cutting itself off after…
Jordan McGowan
  • 197
  • 1
  • 1
  • 9
1
vote
2 answers

How to simulate button click programatically

Hai every one, I am developing an application where users can subscribe or unsubscribe to a group of mailing list using .net.I am using webclient class as below NameValueCollection formData = new NameValueCollection(); formData.Add("email",…
chaithu
  • 564
  • 2
  • 12
  • 25
1
vote
3 answers

webresponse from 3rd party, using their given API, C#

I'm new to C#. I want to send message from a desktop app using C#, for that I bought an API from a mobile company (Telenor). According to their documents first I'll have to get authentication ID by sending request to this URL…
1
vote
1 answer

Last Modified Property When Streaming a File to an External SharePoint

I am currently working with a windows service that moves files from certain locations and keeps them in sync with SharePoint Document Libraries. The uploading/syncing/etc functionality behaves fine but I am having issues with file properties. When…
sealz
  • 5,348
  • 5
  • 40
  • 70
1
vote
3 answers

You must write ContentLength bytes to the request stream before calling [Begin]GetResponse

Error: You must write ContentLength bytes to the request stream before calling [Begin]GetResponse. Can anyone advise why I am getting the above error when running the following code Dim xml As New System.Xml.XmlDocument() Dim root…
user2516387
  • 91
  • 2
  • 4
  • 8
1
vote
2 answers

C# WebResponse Stream losing bytes?

So I have a function like so: private String SendRequest(String jsonRequest) { WebRequest webRequest = WebRequest.Create(_url); byte[] paramBytes = Encoding.UTF8.GetBytes(jsonRequest); byte[] responseBytes; …
brooksaar
  • 35
  • 5
1
vote
1 answer

Getting error response using web request

I am using below code for send XML file to server, if I upload adduser.xml (this is using for adding users) I am getting success response, but for deleteuser.xml (this is user for delete the user) I am getting The remote server returned an error:…
Sree
  • 584
  • 6
  • 20
1
vote
1 answer

C#: How can I POST data to a page redirected by an earlier POST?

I am using c# to accomplish the following: Post data to a page (using HttpWebRequest). Get the response (redirected to another page by the posted data). Post the further data to the response page. I am able to accomplish the first 2 steps, but I…
1
vote
0 answers

Saving HTTPWebResponse PDF Object to File

How do I save a PDF file coming thru a HTTPWebResponse? The file I create seems to be corrupted with different filesize and no content. The code I am using now is as follows : HttpWebResponse response = (HttpWebResponse)request.GetResponse(); …
paradox
  • 1,248
  • 5
  • 20
  • 32
1
vote
2 answers

Can't download complete image file from skydrive using REST API

I'm working on a quick wrapper for the skydrive API in C#, but running into issues with downloading a file. For the first part of the file, everything comes through fine, but then there start to be differences in the file and shortly thereafter…
nick
  • 2,833
  • 3
  • 34
  • 61
1 2 3
8 9