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

WebRequest ConsoleApplication issue

url = @"http://website"; WebRequest request = WebRequest.Create(url); request.Credentials = CredentialCache.DefaultCredentials; //request.Credentials = new System.Net.NetworkCredential("id", "pw","domain"); HttpWebResponse response =…
0
votes
1 answer

Using login cookie in another website c#

I'm trying to get cookies form a loginform, saved it on my cookie container cookieJar, and using in the next request. The cookies are saved correctly(at least,the count shows an appropiate quantity,but when doing the webrequest3, I not getting the…
Ricardo Umpierrez
  • 768
  • 2
  • 11
  • 24
0
votes
1 answer

Get redirected URL from initial link

I have this link http://www.freshwap.me/engine/go.php?url=aHR0cDovL3JhcGlkZ2F0b3IubmV0L2ZpbGUvMmVhZDhlMGE1YTQ5YWZlODc4OTEwNmE5OGUyOTQ5MWEvQXNoYW1wb28uQW50aS5WaXJ1cy4xLjAuMy5GaW5hbC5NdWx0aWxhbmd1YWdlLnJhci5odG1s I want to get redirected url from it,…
0
votes
2 answers

Error on WP7 app WebRequest

I have this errors on 'error List'. 'ContentLength' is not a member of 'System.Net.WebRequest' 'GetRequestStream' is not a member of 'System.Net.WebRequest' 'GetResponse' is not a member of 'System.Net.WebRequest' I'm make an App WindowsPhone 7…
r-magalhaes
  • 427
  • 2
  • 9
  • 18
0
votes
3 answers

Http POST request succeeds in Java but fails in C#

I'm trying to send a simple HTTP POST request to a web service and read the response. I need to do this in a .NET project but the call fails all the time. I tested to call the same web service in Java and it went with no problems at all. Here's my…
Andras
  • 171
  • 3
  • 16
0
votes
1 answer

how to open a browser passing parameter a html code

My WebRequest returns an html code for the page I want to show. How can I show it using a html code returned from my WPF? how can I "create" a page using just returned html code ? And how can I focus a browser when it is open? Plz, some example will…
0
votes
0 answers

WebRequest getting ContentType executes the request

I am trying to test a factory class, checking that the set up was correct: var request = _target.BuildWebRequest(_url, "POST", "someData", "application/xml"); Assert.That(request.ContentType, Is.EqualTo("application/xml")); However, for some…
Uri Kutner
  • 122
  • 8
0
votes
1 answer

Submit data with WebRequest object in get method

I have the following code: var Instance = WebRequest.Create(new Uri("http://mywebsite.com/page.aspx")); var Data = new Dictionary(); Data["Foo"] = "Bar"; Data["Baz"] = "Paz"; How can I submit GET request with the data?
Videron
  • 171
  • 1
  • 3
  • 11
0
votes
1 answer

Webrequest not working in a function when used a second time

I have made a function to create a webrequest and load a api on my website to connect to ssh with parameters. This is the function code: Public Function sshExec(ByVal command As String) Try Dim request As WebRequest = _ …
Niel
  • 1
  • 2
0
votes
1 answer

C# Obtaining data from WebRequest not returning values

I have the following C# method that accepts a URL as an input and returns the text data that exists at that location: public string GetWebData(string uri) { string response = string.Empty; try { var request =…
miguelarcilla
  • 1,426
  • 1
  • 20
  • 38
0
votes
0 answers

Does onBeforeRequest in chrome.webRequest fires for DNS request?

I want to write a chrome extension/app to log DNS request like A or AAA records that are sent from the client browser when a new page is browsed. Does onBeforeRequest in chrome.webRequest API fires for DNS requests? Is there any api to give access…
Marjan
  • 261
  • 4
  • 13
0
votes
1 answer

HttpWebRequest Cookies not working on WinXP

I have problems running this on WinXP (on windows 8 and windows 7 runs without problems) and do not see where the problems stands. I've should be loggedin on the management page but still asking me for password. (it sees the username). so I assume…
0
votes
1 answer

EndGetResponse can only be called once for each asynchronous operation?

Trying to implement a WebRequest and return to the caller synchronously. I have tried various implementations and I think this would be the most appropriate so far. Unfortunately the following code throws an InvalidOperationException with the…
George Taskos
  • 8,324
  • 18
  • 82
  • 147
0
votes
1 answer

Javascript WebRequest Invoke/Cache problem

I am using ASP .Net 3.5 and trying to invoke a WebService using javascript and Sys.Net.WebRequest. The service gets invoked for the first time and everything is fine until I try to refresh. on a refresh th WebRequest object invoke method is called…
Ws.
  • 61
  • 1
  • 2
  • 6
0
votes
2 answers

Add items from 2 listBox to one listBox

Hi how can i add items from 2 listBox to one listBox ex: listBox1 contain Hello listBox2 contain World! So if button1 is clicked in listbox3 will display Hello World! side bye side but not in a new line like Hello World! private void…
terrala7
  • 65
  • 1
  • 8