Questions tagged [webrequest]

WebRequest is an abstract class in .NET Framework for making requests to URIs (including HTTP, HTTPS, FTP and FILE protocols). Related tags: [httpwebrequest], [ftpwebrequest].

WebRequest is an abstract class in .NET Framework for making a request to a Uniform Resource Identifier (URI).

MSDN documentation for WebRequest.

1600 questions
0
votes
1 answer

Call http url (php) generates always WebException

I can call the following url in a browser and it works: http://test.shop.ch/shop/Admin/caller/caller_aufruf.php?do=set_kategorien It does not give soemthing back - only execute the php. But when I try to call the same with C# like using (var client…
BennoDual
  • 5,865
  • 15
  • 67
  • 153
0
votes
1 answer

Webrequest with quotes

I want to build a little remote tool for a school project. (XBMC) At first I would say, that a string variable doesn´t include quotes, but \", which should picture quotes in a textbox and somewhere else. Firstly i mean C# makes quotes with that…
0
votes
1 answer

Submitting to form with checkbox programmatically

I've googled my arse off on this one. The form includes this: And I desperatley try to handle it like this: WebRequest req = WebRequest.Create(link); string…
OHMR
  • 393
  • 6
  • 16
0
votes
0 answers

Download a file with .net compact and C#

I am re-developing an app for a scanner used for stocktakes to allow it to work while offline. In order to do so, I need to be able to download a file from a laptop which is acting as a server. I got to a point at which it works, but only downloads…
ArtleMaks
  • 151
  • 3
  • 19
0
votes
1 answer

C# Optimize HttpWebRequest

I'm making my own HTTPWebRequest class and I'm trying to optimize the time it takes to read the buffer and make a request, so far it takes around 800-1000ms for every request to google.com Same code in C++ takes ~ 200ms any suggestions how I could…
0
votes
1 answer

can not set restricted headers e.g. UserAgent in WebRequest for PCL

microsoft did not implement it, and will not do so according to this: https://connect.microsoft.com/VisualStudio/feedback/details/770104/cannot-set-useragent-of-a-httpwebrequest-in-portable-class-and-winrt-libraries But the web site I'm trying to…
gronk555
  • 5
  • 2
0
votes
1 answer

REST on *just* IIS7 (without a web framework)

I want to upload files directly to IIS7 (in this case I am using the WebRequest object in .NET). Thus I need IIS7 to accept POST, PUT, and DELETE verbs such that I can upload and delete files on the server directly. Is it possible to have IIS accept…
Rodrick Chapman
  • 5,437
  • 2
  • 31
  • 32
0
votes
1 answer

Making http requests from within a ApiController doesn't work

Here is a simplified version of the API controller I created. public class SampleController : ApiController { [System.Web.Http.HttpGet] public string Test(string url) { try { using (WebClient webClient = new…
0
votes
0 answers

why webrequest returns null value

I want to post data to a website by using cs query lib. My purpose is parsing viewstate value and post with my string. I can parse viewstate value correctly but when I post data it returns null value. public string Post(string URL,…
user3297904
  • 59
  • 2
  • 8
0
votes
1 answer

Website Content reading and identifying charset

Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim Imagelink As String = "" Dim Text As String = TextBox1.Text Dim request As HttpWebRequest = DirectCast(HttpWebRequest.Create(Text),…
Dasith
  • 1,085
  • 10
  • 16
0
votes
1 answer

multipart/form-data trying to upload file to server

i'm developing a client to send images to a server using multipart/form-data, my partner is a using a mac and i'm on win8. i'm sending everything the way it works on a mac but from the client side it can't pass through the webservice and the error…
msenos
  • 39
  • 1
  • 11
0
votes
0 answers

reading dynamic/java page using webrequest

I have a VB.NET (2010) forms project, and I want to read a webpage that has a java script on it, generating log output. But when I do a request to the webpage, I only get the static part of the page. When I fire the URL in a browser, it displays…
Dennis
  • 1,528
  • 2
  • 16
  • 31
0
votes
1 answer

Asp.net HttpWebRequest I can not source code

I want html source code with asp.net HttpWebRequest but there is a problem. I can get it. No problem that : https://www.nesine.com/iddaa/default.aspx But I do not get it : http://www.iddaa.com/program/futbol.html in my opinion problem url…
0
votes
1 answer

OAuth RequestToken returning 403

I'm trying to implement the OAuth using a simple class but I'm getting an error public OAuthResponse AcquireRequestToken(string uri, string method) { NewRequest(); var authzHeader = GetAuthorizationHeader(uri, method); // prepare…
Pedro Cavaleiro
  • 835
  • 7
  • 21
0
votes
1 answer

c# Unable to download file ( file used by another process )

I have the main app and an updater. I start the updater from the main program and right after the updater started, i kill the main program. All ok by now. Now, i check a xml file from a website for files that must be updated. I use this to download…
nikodemus
  • 81
  • 10