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
2 answers

.NET How to Send WebRequet to Specified IP address in same domain

I have a problem. Whenever I'm sending WebRequest to https://myaddress.com, it resolves to the wrong IP address (this domain has several IP adresses). How can I specify IP address, which I want to send the WebRequest to? Thanks.
Augis
  • 1,903
  • 1
  • 16
  • 21
0
votes
2 answers

Why is connection keep-alive only sent on first request with WebRequest?

I have the following code for testing purposes for( int i = 0; i < 5 ; i++ ) { var url = "http://myserver.com/Warmup"; var request = WebRequest.Create(url); using (WebResponse response = request.GetResponse()) { using (var stream…
sharptooth
  • 167,383
  • 100
  • 513
  • 979
0
votes
1 answer

iPhone loading screen until web request is finished

I need to show "Loading screen" (just an image) at the start of application and when application gets all needed data from web, then first viewcontroller is shown. I have succeded doing it by setting my own black screen "Default.png" as…
zhuber
  • 5,364
  • 3
  • 30
  • 63
0
votes
1 answer

Delete folder on ftp

Hi I want to delete a folder on my ftp I tried this: WebRequest request = WebRequest.Create(strPath); request.Method = WebRequestMethods.Ftp.RemoveDirectory; request.Credentials = new NetworkCredential(strUusername,strUpassword); …
0
votes
2 answers

How to get the response stream on a non 201 status code

I'm having some problem's grabbing a response stream from a request that returning status code 422. HttpWebResponse objResponse = (HttpWebResponse)wr.GetResponse(); The wr.GetResponse throws an webexception because the status code isnt 201. So i…
Patrik Potocki
  • 316
  • 3
  • 9
0
votes
0 answers

How can I parse HTTP headers in a Chrome extension?

I'm working on a Google Chrome extension that does some processing based on HTTP response headers using the chrome.webRequest.onHeadersReceived event. I'm able to receive the headers, but the documentation seems to indicate that the headers are just…
Sam
  • 40,644
  • 36
  • 176
  • 219
0
votes
0 answers

WebRequest responses mixed up in multithreaded environment

I am facing a web requests responses mixed up. I am developping a C# project on mobile device (Pocket PC 2003). Here is the context My software has a thread running every 5 seconds to ping a server, send its status and retrieve some server…
sdespont
  • 13,915
  • 9
  • 56
  • 97
0
votes
3 answers

WebRequest from localhost to localhost : why is it being denied?

My app uses a WebRequest at certain points to get pages from itself. This shouldn't be a problem. It actually works fine on the server, which is a "shared" hosting package with Medium trust. Locally, I use a custom security policy based on Medium…
harpo
  • 41,820
  • 13
  • 96
  • 131
0
votes
3 answers

do httpwebrequest but without waiting for response

Here i do not want to wait for response from server because i do not care about response for these httpwebrequest. is it ok? or will it affect system in future? HttpWebRequest PostRequest = (HttpWebRequest)WebRequest.Create(PostUrl); …
Maddy
  • 907
  • 3
  • 10
  • 25
0
votes
1 answer

HttpWebRequest BeginGetResponse callback not firing on WP8 (working on WP7)

I'm having a problem with a previous app not working on WP8, which works perfectly on WP7. This is the code I'm using for the http request: public void SendMessage() { request = WebRequest.Create(uri) as HttpWebRequest; …
0
votes
1 answer

Is there a C# library able to load html code and to define the header

I have to download the html code from a website and parse it (unfortunately, parsing the html is the only way to get the necessary information). Of cause I could write my program using WebRequest, but I wonder whether there's a finished library for…
Christopher
  • 2,005
  • 3
  • 24
  • 50
0
votes
1 answer

VB.NET 2010 Web Request Refresh

Hey im kind of new to VB and am trying to get a web request to refresh every 30 seconds, and have got stuck on how to implement a timer in to it. Here is the code I have produced so far, i would be grateful for the correct solution: Public Class…
user2010338
0
votes
2 answers

Post data from text file into website password spot?

I want to read from a text file line by line and enter each line into a online box to see if it works. For example: bob tom rob I want to read from that and enter it into, say my websites username or password box and enter and see if it works. I…
user2094510
0
votes
1 answer

Responding to a WebRequest

I have created a simple XML Request on test.aspx page. System.Net.WebRequest req = System.Net.WebRequest.Create("http://server.loc/rq.aspx"); req.ContentType = "text/xml"; req.Method = "POST"; string strData =…
mko
  • 6,638
  • 12
  • 67
  • 118
0
votes
2 answers

Returning value from AJAX request in a global variable

Sorry if this question is duplicated but I couldn't solve my problem from other solutions. I've got this code in a sepate file included in my main index: var getSuggestedData = { serviceURL: $("input[name=suggestedServices]").val(), …
Teknotica
  • 1,096
  • 6
  • 19
1 2 3
99
100