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

WebRequest/WebResponse times out on fresh login

I have the following methods to retrieve data from a website I use: private WebResponse GetWebResponse() { string formUrl = "https://www.draftkings.com/account/login"; string formParams = string.Format( …
Jason D
  • 2,634
  • 6
  • 33
  • 67
0
votes
0 answers

Trying to check if disconnected using System.Net.WebRequest

I'm developing a website in asp.net and c# which needs to catch if the user isn't connected when they press a button. So basically, if the user is connected, it will load up the GetList function, and if not a message will appear. Code so far…
user1560834
  • 151
  • 5
  • 16
0
votes
1 answer

Illegal Characters in Path Error When Downloading CSV File

I need download a CSV file and then read it. Here is my code: tickerValue = "goog" Dim strURL As String = "http://ichart.yahoo.com/table.csv?s=" & tickerValue Dim strBuffer As String = RequestWebData(strURL) Using streamReader = New…
gromit1
  • 577
  • 2
  • 14
  • 36
0
votes
2 answers

Is it possible to read .jsp pages in .net application

I have a .jsp page from a third party i need to get information from.My application is being developed in MVC4. how will i get information from this .jsp file in my application. I tried using webrequest but the content is not there. Regards Fatema
Fatema
  • 135
  • 1
  • 10
0
votes
2 answers

Threads are not responding

I'm trying to fix this issue from 2-3 hours but unable to fix it. I'm trying to download a file in three parts three threads. the problem is when one part is completed, other threads stop downloading. Example: let's say i want to download 300kb…
Arpit
  • 12,767
  • 3
  • 27
  • 40
0
votes
1 answer

403 forbidden exception in accessing access token

I am trying to generate a new access token when access token from Google is expired. But On my production server i am getting below mentioned exception: Exception: at System.Net.HttpWebRequest.GetResponse() at System.Net.HttpWebRequest.GetResponse()…
Himanshu Jain
  • 518
  • 4
  • 20
0
votes
1 answer

WebRequest SSL certificate validation

What are the cirteria WebRequest uses to validate the host certificate if it is a SSL connection?
user1598019
0
votes
3 answers

C# Grabbing text from a span

I tried this: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using System.IO; using System.Net.Sockets; namespace ConsoleApplication1 { class Program { static void…
0
votes
1 answer

Webrequest from website that needs login

I'm trying to login to a website using webrequest and POST. I've used Chrome's Inspect Element to see what data is being posted: at login on POST the request header contains this information: …
Alin I
  • 580
  • 1
  • 7
  • 24
0
votes
2 answers

Reading XML File from https url

I'm trying to read an xml file from a https url System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls; using(WebClient client = new WebClient()) { contents = client.DownloadString(dr["XmlImpotURL"].ToString() +…
Tunisiano32
  • 180
  • 1
  • 8
0
votes
1 answer

c# WebRequest UriFormatException

I currently have the below code, that throws an exception: UriFormatException: Invalid URI: The Authority/Host could not be parsed. on the WebRequest.Create line. What am I doing wrong? var path =…
will
  • 1,397
  • 5
  • 23
  • 44
0
votes
1 answer

How can I change this webbrowser request to a HTTPWebRequest?

I'm having trouble converting this into a HTTPWebRequest. I got this to work perfectly, using a WebBrowser, but whenever I try to make a HTTPWebRequest it fails. I'm not sure what I'm doing wrong. Working code: private void Login() { WebBrowser…
0
votes
1 answer

Net.WebRequest taking so much time and does not finish to get response

Whenever using the WebRequest to test internet connection works fine. However while attemping to connect to internet (after shuting down wifi) and have wifi's status to "no access to internet" IF I do the webrequest again it just doesn't work. I…
edgarmtze
  • 24,683
  • 80
  • 235
  • 386
0
votes
1 answer

How do you post an object using WebRequest.Create?

I am working with the Balanced Payments API and trying to figure out how to create a customer. https://docs.balancedpayments.com/current/api.html?language=bash#creating-a-customer The address is passed as an object, though I am unfamiliar with how…
Brian Salta
  • 1,576
  • 1
  • 10
  • 18
0
votes
0 answers

WebResponse Get Response from Google Error 405 Method Not Allowed C#

I am trying to get a response from google in c# to get a token. I am using the url - https://accounts.google.com/o/oauth2/token. My code is the following; public WebResponse GetResponse(string url, params GoogleParameter[] parameters) { …