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
1 answer

WebClient.DownloadFile convert to File VB.NET

Does anyone know how to parse a Webclient.DowloadFile to File in VB.Net? I'm currently using the following Code but I keep getting the errors: (BC30491) Expression does not produce a value. (BC30311) Value of Type can not be converted to…
Alpha Coding
  • 37
  • 1
  • 2
  • 13
1
vote
0 answers

pass post params to WebClient.UploadFileAsync

hello i have a simple file upload with just one extra post parameter which is imgtitle. it's used to rename the image after it's been transferred to the upload location on the server. PHP:
unloco
  • 6,928
  • 2
  • 47
  • 58
1
vote
0 answers

WebClient does not support concurrent I/O operations. in c# when i call my wcf service

I have a class as you can see that calls my service . public class ReceptionService : IReceptionService { private WebClient ClientRequest; private MemoryStream ms; private DataContractJsonSerializer…
Ehsan Akbar
  • 6,977
  • 19
  • 96
  • 180
1
vote
1 answer

Microsoft Bot Framework C# Async Issues

I have an issue where a function is not being called. My guess is that it is a synchronization problem. Here is the code: await context.PostAsync("Foo Bar"); The function below doesn't seem to be called if I put it before or after the POST to the…
Joel Parker
  • 295
  • 1
  • 4
  • 17
1
vote
1 answer

WebClient request fails because client is seen as outdated browser

I'm attempting to download an HTML response from a website but I keep getting the following response: The security settings for your Internet browser or device appear to be out of date. Please upgrade now. I've attempted to use every User-Agent…
jrobinson6274
  • 163
  • 2
  • 13
1
vote
1 answer

Microsoft Bot Framework C# Web Client does not exist in the current context

I am trying to post a message received from the user with web client with the following code Includes: using System; using System.Net; using System.Threading; using Newtonsoft.Json; using Microsoft.Bot.Builder.Azure; using…
Joel Parker
  • 295
  • 1
  • 4
  • 17
1
vote
0 answers

System.UnauthorizedAccessException in System.dll while i am downloading an image from a folder

I have an image in one of my folders, using webclient i am trying to download the image. using (WebClient webClient = new WebClient()) { webClient.DownloadFile(SessionManager.Current.ImagePath,SessionManager.Current.ImageName); } Here…
WorksOnMyLocal
  • 1,617
  • 3
  • 23
  • 44
1
vote
2 answers

Webclient POST 405 Error in API

I've written some code a while back that handles POST requests. Suddenly it stopped working whilst I changed nothing in either the API (It still works fine with postman) nor the C# code. But I get a 405 error (method not allowed) when I run my…
Freek W.
  • 406
  • 5
  • 20
1
vote
1 answer

Cant download JSON file from stats.nba using JSON.net

I want to download this json file http://stats.nba.com/stats/leaguestandingsv3?LeagueID=00&Season=2015-16&SeasonType=Regular+Season , but when I run my program nothing happends and I get a timeout exception.I have to eventually put it in a datatable…
GetYourWeightUp
  • 135
  • 1
  • 2
  • 7
1
vote
1 answer

Replacing WebClient with offline XDocument

I have built an entire Windows Phone 7 app (which I'm quite proud of!) but I just realized there is no real purpose for the XML files accessed in my app to be hosted on my website. Since they never really have to be updated I decided it makes much…
Dan
  • 205
  • 1
  • 3
  • 9
1
vote
0 answers

Webscraper not working on craigslist site

I am doing this course on udemy that had me built a webscraper to scrape Craigslist. I typed it exactly as the teacher showed in his video and when he runs it on screen it works. However, when I run it then it comes back with no matches. Here is…
djblois
  • 963
  • 1
  • 17
  • 52
1
vote
1 answer

.NET and ServicePointManager.SecurityProtocol

I'm using the webclient class in .net and I went to download a site. Dim oWebClient As New WebClient() Dim oDownloadedPage As String = oWebClient.DownloadString() It tossed an authentication error after a little searching it turned out that…
Henry
  • 2,953
  • 2
  • 21
  • 34
1
vote
0 answers

Error copying binary file from Linux VM to Windows VM using PowerShell

I'm unable to determine the reason for the problem that I have copying binary files from my Linux VM to my Windows VM. Steps performed: On Linux: Enabled apache2 service on Linux Copied the exe file to /var/www On windows: Opened a PowerShell…
Akkosh
  • 11
  • 2
1
vote
2 answers

How to get data from a webapi, parse it and display it on the Windows Phone 7

I made a post erlier this day about getting data from an webapi on the windows phone 7 but I think I overcomplicated things and were too unclear about what I wanted to do. Now the thing I am trying to do is having a method going out and fetch some…
1
vote
0 answers

Getting response on GET Request C#

I'm trying the following code to execute a GET request using C#. using (WebClient wc = new WebClient()) { string url = the url; wc.Headers.Add("Authorization", "Bearer token"); var json =…
MAK
  • 1,250
  • 21
  • 50