Questions tagged [webclient]

WebClient is a class for .NET Framework applications that provides methods for sending and receiving data from a resource identified by a URI.

Read more about the WebClient class and its usage here: https://learn.microsoft.com/en-us/dotnet/api/system.net.webclient

4098 questions
1
vote
2 answers

Web client request gets hanged if Internet is disconnected while executing it using

I am using web client to send some request parameters to server and then get response according to request. But the issue which i face when every i try to send web client request is if Internet gets disconnected while sending request, it will hang…
M.Farrukh
  • 45
  • 10
1
vote
2 answers

How to extract one word or some words from an HTML page C#

Here I'm trying to extract one word from an HTML page. For example, there are two textboxes (1 and 2). now I'm trying to give stackoverflow question ID on textbox1 and get "asked" value on textbox2. For example, if I give 36 on textbox1 this should…
Leviathan
  • 31
  • 1
  • 9
1
vote
1 answer

Unable to connect to remote server WebClient

The inner exception: System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to…
TopBanana9000
  • 818
  • 2
  • 14
  • 32
1
vote
0 answers

WebChromeClient open app in chrome browser.I want to open it in WebView.What's the solution for that

WebChromeClient open app in chrome browser.I want to open it in WebView.I used WebChromeClient for KitKat devices and for other WebViewClient used. What's the solution for that?
1
vote
1 answer

How to query InfluxDB using WebClient in C#

I'm trying to write a simple query command. Documentaion for http for influxDB is here. This is what I have so far: WebClient client = new WebClient(); client.Credentials = new NetworkCredential("root", "root"); var reponse =…
JJSSOQ
  • 49
  • 2
  • 10
1
vote
0 answers

I want to receive RTSP stream in OpenCV from web URL

I have RTSP url, when i play it using VLC it works. But i need to get the frames from stream in python. so i used OpenCv but it is not receiving the frame. I need suggestion to solve this problem. current code in Python Opencv is. import os import…
1
vote
0 answers

UploadFileCompeted Event does not fire

I have written a program with which I can upload a file via drag and drop to an FTP. If the file has been uploaded and is free of errors, the software should generate a link. For this I use an asynchronous upload and the method…
DonKnash
  • 53
  • 9
1
vote
1 answer

403 Forbidden ERROR with WebClient request

I understand this is a quite frequently asked question and also have many proposals and solutions. However, I tried almost all of them but still cannot fix this issue from my side, even with Fiddler's http request headers configured. I am not sure…
Stanley
  • 53
  • 1
  • 5
1
vote
2 answers

JsonSerializationException: Cannot deserialize the current JSON object

i am very new to C# and Visualstudio2017 and have been stuck on this for literally weeks. Searching the net but not finding results relating to this that i can understand properly. What i am trying to do is get json data from…
1
vote
1 answer

File cannot be opened when using webclient.DownloadFile not working with long URI

I'm using C# and I'm trying to download a file and save it to the disk. Everything works with not too long URIs, but when I have very long one (around 300 characters), the file gets downloaded to the disk and save, but when I try to open it says it…
polonskyg
  • 4,269
  • 9
  • 41
  • 93
1
vote
3 answers

Not able to use webClient.DownloadStringCompleted in WP7?

I have a simple code: using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using…
Ravi
  • 147
  • 1
  • 10
1
vote
1 answer

.Net Windows webBrowser - how to extract authorization header from webBrowser response and send to another consecutive request?

I have a windows desktop application. I need to open SSO login page in windows application. For this, I am using windows web browser control to open SSO login page. Once successfully logged-in, I need to get Authorization header from SSO login and…
1
vote
0 answers

I can't log in to elastic search using java with 302 response but it worked with postman

Actually, I want to visit the ElasticSearch directly without kibana. I use Java to design this process. When I used postman to test the login step with token and kbn-xsrf in the headers (picture showed here 1: https://i.stack.imgur.com/ti9Nf.png) ,…
neilxie
  • 121
  • 1
  • 1
  • 4
1
vote
1 answer

How do I query a file on FTP server in PowerShell to determine if an upload is required?

The project is an MVC website coded and built using VS2017 and (on premises) TFS2017. The Build Definition is currently working and publishing to the staging location upon check-in. The PowerShell script below, derived from David Kittle's website,…
Alan
  • 1,587
  • 3
  • 23
  • 43
1
vote
1 answer

PowerShell DownloadFile() not working for Nexus artifact download

I am trying to download the latest artifact from a Nexus repository. If I give the exact zip file name, it is working fine. When I try to download using a generic URL (REST URI) its giving me 401 Unauthorized. I have tried Invoke-WebRequest,…