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

How to send DOMAIN\username in a post webrequest

I have a rest webservice and i want to transfer a username in the body of a webrequest. The username looks like this: DOMAIN\robert.miller But the username which comes to the server is DOMAINobertmiller. It escapes the string! Here is my code how i…
Roman L.
  • 869
  • 1
  • 8
  • 15
0
votes
1 answer

scrape site after login

I'm trying to scrape a website that requires a login. Getting an error that I haven't received before, copied the code from another forum successfully in the past: Exception Details: System.Net.ProtocolViolationException: Cannot send a content-body…
bramwell2010
  • 175
  • 3
  • 14
0
votes
2 answers

WebRequest can't retrieve video info?

WebRequest request = WebRequest.Create(new Uri("http://istr03.izlesene.com/data/videos/7213/7213704-360_2-103k.mp4/e5ae7a74a30f645c6fc0c5aa0fde9076/531B29B7")); request.Method = "HEAD"; using (WebResponse response = request.GetResponse()) { …
user2989391
  • 61
  • 1
  • 10
0
votes
1 answer

500 error on api request. works fine when called through browser

Hello I have an api which authenticates the user login . Now when I hit this rest service in my browser it displays the result but when I try to do this using my code it gives in 500 error. Please help me with this . My Api:…
0
votes
1 answer

how can i do on Asp.Net?

How can i do this on ASP.Net (C#) ? //
0
votes
2 answers

Load an image from web with new thread

I am trying to load an image from a webserver into a pictureBox. To not block the Form untill the picture is loaded i start a new Thread which works on the LoadPicture()-function till all work is done. Everything will be started on a…
0
votes
1 answer

Get html code into string C# when need account authorization

I want to download webpage code (plug.dj) and paste it into string. It is not hard but when I test my program an error appeared. The remote server returned an error: (401) Unauthorized. I think I cannot download code because I am not logged on…
Sonyck
  • 186
  • 6
0
votes
0 answers

"Unable to connect to the remote server" - works at home, doesn't work at work

I have this 1-line request and it is failing: var reader = XmlReader.Create(address); However, I can open it in the browser no problem. At home everything's working fine, at work, I get this problem. Any idea what's wrong? Thanks.
monstro
  • 6,254
  • 10
  • 65
  • 111
0
votes
0 answers

Error when trying to save a Bitmap

When I try to save this image it gives me that error A generic error occurred in GDI+ Full Save path is C:\Users\BLUE\Documents\Visual Studio…
TC Alper Tokcan
  • 369
  • 1
  • 13
0
votes
1 answer

Sending information through WebAPI to a database?

Currently I am using a WebAPI to send Data to a local server XML is below ArrayOfCasualty Casualty BeaconID: A1 BeaconID Latitude 51.41459808 Latitude Longitude -5.43823242 Longitude OwnerName Mr. Damola OwnerName Pulse 200…
user001
  • 415
  • 1
  • 7
  • 22
0
votes
2 answers

Error sending WebRequest to Spreedly with C# : (422) Unprocessable Entity

I'm working with Spreedly, and I'm running into what I would assume is a minor problem. For the life of me I don't understand why my code isn't sending my context correctly... This is my code (credentials have been changed) that returns the error…
arucker
  • 709
  • 7
  • 7
0
votes
2 answers

Waiting for a dependent request to complete within a Visual Studio Web test

A request within my web test has multiple dependent requests: REQUEST DEP REQUEST A DEP REQUEST B I need for the request to B to wait until A has completed because I need to extract a value from the response of A and put it into the request for…
litterbugkid
  • 3,534
  • 7
  • 36
  • 54
0
votes
1 answer

C# Webrequest upload file and proceed

How can i upload a simple image to www.newocr.com, select a language from the combobox below , click the 'Upload' button and after the 'OCR' button and finnaly getting the string from the source code which stores the string into a id All…
0
votes
2 answers

How do I download a file from LiveLink using c#?

I am writing a c# agent to pull data out of Excel workbooks stored in Livelink but I am unable to download the files. webClient = new WebClient(); webClient.Credentials = CredentialCache.DefaultCredentials; webClient.DownloadFile(strFileLocation,…
Melbz
  • 512
  • 4
  • 14
0
votes
1 answer

Blocking webRequest

This code doesn't work: chrome.webRequest.onBeforeRequest.addListener(function(details){ console.log(details); },{urls:[""]},['blocking']); This code does work: chrome.webRequest.onBeforeRequest.addListener(function(details){ …
holden321
  • 1,166
  • 2
  • 17
  • 32