As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [httpwebrequest]

HttpWebRequest is a concrete class for .NET Framework applications that provides an HTTP-specific implementation of the abstract WebRequest class. Related tag: [webrequest].

Filter by
Sorted by
Tagged with
0 votes
1 answer
30 views

C# HttpWebRequest issue: The underlying connection was closed: An unexpected error occurred on a send

I am making a winforms apps, and I would like to send multiple HttpWebRequest to my Https API url at same time ( like 20-30 requests) and total request not limited. However after a random time, my ...
J.Tran's user avatar
  • 115
0 votes
0 answers
26 views

How to put a file along with a custom class in a POST Rest call?

I've been scraping my head for a while, i just can't figure out on how to do this with NLogger(Net4.7.5) The intention of this HttpPost request is that its supposed to send a .stl file together with a ...
Wilkret's user avatar
-1 votes
1 answer
33 views

Unity API Returning Vector3s but the Values are Wrong

I'm using Replicate API to try and get a point cloud in Unity. I finally go the API returning a JSON file, and I'm pretty certain it's returning vector3s of the positions of each point. Yet, when I ...
Mashimaro7's user avatar
0 votes
0 answers
57 views

Using a certificate from an Azure Key Vault to authenticate a Powershell WebRequest with

I have an Azure KeyVault that holds a .pfx-Client Certificate that I need in order to authenticate a WebRequest sent from an Azure Function to a third party Web Service. When I conduct this WebRequest ...
ABF's user avatar
  • 35
0 votes
1 answer
15 views

How SOAP header should be added in Dynamically invoked web service using c#?

The below code invoke the webservice dynamically and process the request. How to add a soapheader to this dynamically called service? HttpWebRequest myWebRequest = (HttpWebRequest)WebRequest....
Manoj's user avatar
  • 41
0 votes
0 answers
17 views

How to fix Unity MacOS application that only hangs/freezes when running in "Application" folder

I've built a Unity MacOS application that runs fine in the debugger, and fine when run from the build directory, but when the *.app file is copied over to the "Applications" folder, it hangs ...
Dogtanian's user avatar
0 votes
0 answers
26 views

Springboot Web Application, controller cannot redirect to a specified page

I'm building a Springboot Web Application. I submit the username and password to the request "/login", and I want the controller function login() to redirect to the personal management page ...
yilin cai's user avatar
0 votes
1 answer
54 views

Change Output Of API Request?

I'm trying to use Replicate to send a text prompt and get a point cloud in return (to hopefully convert into a model) and bring into Unity. I got the request calling in Unity, but there seems to be ...
Mashimaro7's user avatar
0 votes
0 answers
25 views

I want to retrieve a captcha image from an aspx webpage into my C# WF application picture box

I am not able to retrieve the captcha code since the link to it is not a file I am using C# WPF and i wrote this code but image is not shown no error when I run script but the image control is empty ...
Rafeeq alfaqih's user avatar
0 votes
0 answers
33 views

C# HttpWebRequest TLS1.3 Operation Timed Out

I have a small application that downloads images from the website of one of our suppliers. I know the supplier uses TLS1.3 on his server, so since the application will be running on a Windows server ...
Ivan Sammut's user avatar
0 votes
0 answers
83 views

How can I download PDF files with HttpRequest

I have a problem, my program reads an ODT file and downloads the links inside it, these links correspond to PDF files available on an intranet. The problem is that as a result of the program, I don't ...
Gekidow's user avatar
0 votes
1 answer
49 views

Restsharp. How to get the response details

So, in a <TargetFramework>net6.0</TargetFramework> console app, I'm using RestSharp and trying to get the error message from a PATCH request. This is what Postman returns: However, I can'...
Jack Casas's user avatar
0 votes
0 answers
7 views

AttributeError: 'HttpWebRequest' object has no attribute 'delete'

url = 'something' headers = {'Content-Type': 'text/xml', 'Accept' : 'application/xml'} request = HttpWebRequest.Create(url) request.delete(url, headers = headers) I am trying to call a delete menthod ...
Claire's user avatar
  • 1
0 votes
1 answer
41 views

Curl working on SSH but C# web request gives 404 error

I am trying SOAP request from a Linux SSH. When I use the CURL command, I can get expected SOAP result. curl --location 'https://DOMAIN_URI' --header 'Content-Type: text/xml' --data 'SOAP body here' ...
Salman Rafique's user avatar
0 votes
0 answers
17 views

FormData.has not working in react native application

I am working on a project where I need to send image files to a server using a mobile app. After some research, I found that most people use FormData to send images to remote servers so I gave it a go....
Jake S's user avatar
  • 1
0 votes
0 answers
15 views

HttpWebRequest Not able to call API from insider the container Dotnet

HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create(requestendpoint); // Set the Headers WebReq.Method = methodType.ToUpper(); WebReq.Headers.Add("...
bashmastr's user avatar
0 votes
0 answers
21 views

How to do NTLMv2 auth when consuming web service in Xamarin.Android client

We have a legacy app built with Xamarin.Android that uses HttpWebRequest to consume a web service. We're authenticating with NTLM (not v2) by setting the HttpWebRequest.Credentials property to an ...
Douglas Henke's user avatar
0 votes
0 answers
36 views

HTTPWebRequest API Post fails login

I have an API that has SSO enabled on it. I am using HttpWebRequest to call the API to fetch data from it. It is a queuing website and I am fetching the message count in a specific queue. Code is as ...
Pri645's user avatar
  • 85
0 votes
0 answers
12 views

Can't add Teamcity Builds in queue with C# webrequest

With Teamcity Entreprise 9.0 I was able to add builds in queue by using the request url https://{hostname}/httpAuth/action.html?add2Queue={buildTypeId} but not anymore on Teamcity Professional 2022.04....
Tchamie's user avatar
0 votes
0 answers
32 views

C# HttpWebRequest authenticate against htaccess protected page and handle redirect

I'm trying to write code for a page on our website which will pass users through to an htacess protected page on another site and programmatically authenticate. This is my first time doing something ...
user3562286's user avatar
0 votes
0 answers
42 views

WCF Generated Client vs Web Request

I just had a general question about WCF Client generated by svcutil from a WSDL versus making a call using HttpClient with the correct parameters. I didn't even know WCF existed until a recent ...
97WaterPolo's user avatar
0 votes
0 answers
29 views

HttpWebRequest post arabic data like squares

I am trying to send a HttpWebRequest data in Arabic to my e-shop using c#. The problem is that in e-shop the Arabic chars. looks like special characters like this My c# code is in bellow. If some ...
Eng Sabreen Saber's user avatar
0 votes
1 answer
58 views

i am getting error 4051 mql4 using webrequest

this is my code I am trying to send a PUT http request to this endpoint but Im getting error 4051 and also status code is -1 and it is not even reaching to the server. void OnStart(){ double equity ...
amir.the.dev's user avatar
0 votes
0 answers
16 views

app crashes when trying to send multiple fcm messages programmatically

i am trying to create a messaging app using xamarin.forms. i created a send button and added the following code: private async void send_Clicked(object sender, EventArgs e) { await Task.Run(() => ...
rana hd's user avatar
  • 347
2 votes
1 answer
64 views

C# stumped with screen scraping issue on aspx page

I'm having some trouble scraping some HTML that I'm getting from a postback on a site. It is an aspx page that I am trying to get the generated HTML from. I have looked at the cookie data and session ...
mang's user avatar
  • 163
0 votes
0 answers
33 views

HttpWebRequest how to completely close connection to server?

There is a problem. I am making a website parser. Apparently, there is some kind of protection from him (Apache server), after about 220 requests, the answer "The operation has timed out" is ...
wiBear's user avatar
  • 1
0 votes
1 answer
24 views

Custom string from TextBox in webrequest

i am trying to send a HttpWebRequest with the following body : string body = "{\"prompt\": \"MyText\",\"n\": 2,\"size\": \"256x256\",\"...
Sam's user avatar
  • 3
2 votes
2 answers
254 views

bytes[] not receiving at web api using HttpClient C#

I'm sending bytes[] to .net core web api method(from Windows application to web API) by using HttpClient with below code HttpClientHandler clientHandler = new HttpClientHandler(); ...
Ra_g's user avatar
  • 35
0 votes
1 answer
88 views

downloaded xlsx file corrupt useing IIS and c# httpwebrequest

I have the following problem: When I'm downloading xlsx or docx file, the downloaded file is corrupt. Other types of files (Pdf for example) is working fine. I have also tested different MIME-Types (...
David Loraj's user avatar
0 votes
0 answers
57 views

How to display response in Xml format?

I want to display in console the response from request in pretty Xml format, I write code but console displays nothing. What I want from project is: there some Xml requests (they should work step by ...
John Paul Johns's user avatar
1 vote
0 answers
1k views

WebException:The request was aborted: Could not create SSL/TLS secure channel

Facing this issuer since window was upgraded Environment : Windows 2012 R2 .Net Framework : 4.6.1 TLS 1.1,1.2 configured, Registry entry added Still Error persist if we visit few links[few will work, ...
Sudarshan kumar's user avatar
-1 votes
2 answers
59 views

SimpleJSON how the get "location" item values in JSON array

"results" : [ { "geometry" : { "location" : { "lat" : 50.4501, "lng" : 30.5234 }, ...
IServeladik I's user avatar
1 vote
1 answer
762 views

"Could not create SSL/TLS secure channel" while setting SecurityProtocol and ServerCertificateValidationCallback

I know that this question was asked many times on Stackoverflow, however I looked at many of the answers, yet I still couldn't find a solution that worked for me. I have this block of code, in which I ...
Max von der Mühle's user avatar
0 votes
0 answers
68 views

.sqlite file corrupted after http upload via powershell

I have this powershell script that uploads a file : $URL = 'DESTINATION'; function UploadFile { param ( $path, $filename ) $LF = "`r`n"; $fileBytes = [System....
Sabrebar's user avatar
0 votes
0 answers
33 views

Getting Operation Timed error if posting request to other ports rather than specified 6007 port in c# .net

private static string GetWebResponseMsg(string URI, string jsonRequest, string method) { try { var httpWebRequest = (HttpWebRequest)WebRequest.Create(URI); ...
Gautam Kulkarni's user avatar
-1 votes
1 answer
121 views

HttpWebRequest - C# - Post with Certificate.crt + private.key

How can I send a certificate with Private.key? I am sending only the certificate and it returns a 403 Forbidden error. Certificate + Private.key GetAccessToken Code ...
Rafael Cavicchioli's user avatar
0 votes
2 answers
95 views

C# API requests which return a class

Hey all (newbie here) I am developing A Xamarin forms application In which I am already making API requests (Code is Down Below), However, the response I am getting back at the moment looks like this: ...
Ethan Lewis's user avatar
0 votes
0 answers
44 views

How to block a request in an asynchrounous way inside a Firefox add-on?

I'm working on a minimal dyi ad-blocker in a form of a firefox add-on. This is a project for my courses, so I need to be quite specific on a solution. The solution goes like this: Catch every request ...
Martynas Jurkėnas's user avatar
0 votes
0 answers
62 views

GetResponse is throwing time out error after several requests to JIRA Cloud Zephyr

After couple of execution, invoke code activity is encountering exception. Dim fr As System.Net.HttpWebRequest Dim targetURI As New Uri(strURL) fr = DirectCast(HttpWebRequest.Create(targetURI), ...
Pushkar's user avatar
0 votes
0 answers
27 views

How do I make a POST request in Visual Basics code from Outlook

I'm a beginner in Visual Basics and would like to make a post request using Visual Basics from Outlook. I looked up on HttpWebRequest but I haven't been successful. Here's my cURL equivalent code: ...
ronmakh's user avatar
  • 39
0 votes
1 answer
36 views

Trying to use Google TTS using HttpWebRequest but it doesn't work

I'm trying to use Google's TTS to convert a text to speech and I want to use HttpWebRequest for this, as I want to avoid any third-party clients. (This is because I'm practicing calling Web API's.) So ...
Wim ten Brink's user avatar
0 votes
1 answer
119 views

Convert WebRequest into httpclient in C#

Got this code HttpWebRequest request = (HttpWebRequest)WebRequest.Create(host); request.Method = "HEAD"; request.Timeout = 3000; HttpWebResponse response = (HttpWebResponse)request....
smiley rainbow's user avatar
0 votes
1 answer
39 views

PayPal IPN 414 Error When Verifying Received Data

PayPal is returning a 414 "Request-URI Too Large" error when requesting POST to verify a data received. Admittedly, the data we have is too long but we couldn't do anything with that since ...
sd4ksb's user avatar
  • 231
0 votes
0 answers
29 views

How to enable wininet cache in WRE

We have a program used httpwebrequest to download and cache, it works on windows, but when running the program in WRE (windows recovery environment), the download performs well, but there's never ...
jane's user avatar
  • 11
0 votes
0 answers
46 views

C# Error - Request stopped: somehow closed the connection

I was getting data from the site with the codes I created with C#. The code I created ran for a while, then System.Net.WebException: 'Request aborted: Connection closed unexpectedly.' I started ...
Suat Seçkin's user avatar
0 votes
0 answers
80 views

ASP Net 7 web API authentization without login

I am unexperienced with ASP net Authentication or Authorization in general. I build small WEB API with 1 Controller with 1 Action: [ApiController] [Route("HeliosSync")] public class ...
David Bašta's user avatar
0 votes
1 answer
179 views

HttpWebRequest causes https endpoint to 403 only in .NET 3.5

I'm attempting to call an api using .NET Framework 3.5 I'm trying it with HttpWebRequest but I've not had different results with WebClient The following code works in .NET Framework 4.8, however in ....
Richard Harris's user avatar
1 vote
2 answers
588 views

Unable to make HttpWebRequest that is working on Postman

I have a token request that works on Postman on a server. No body, just basic authentication with username and password: However, I have this code below that returns the error: The request was ...
Kinyanjui Kamau's user avatar
0 votes
0 answers
341 views

Invoke-WebRequest with client certificate works in Powershell but unable to do this in .NET C#

I'm trying to download from a specific endpoint which requires me to authenticate using a client certificate. I am able to do this in Powershell with the following command: $response = Invoke-...
Victor de Antoni's user avatar
0 votes
1 answer
233 views

Unity http WebRequest post/send data to a input-field

I want to use UnityWebRequest to post data into an input field on a website for authorization. I am able to post data to a website called "https://httpbin.org/post" and I got a success ...
Dev God's user avatar

1
2 3 4 5
112