You’ve got some extra stuff in there if you’re really just trying to call a website. All you should need is:
WebRequest webRequest = WebRequest.Create("http://ussbazesspre004:9002/DREADD?" + fileName);
WebResponse webResp = webRequest.GetResponse();
If you don’t want to wait for a response, you may look at BeginGetResponse to make it asynchronous .
Related Contents:
- HTTP POST Returns Error: 417 “Expectation Failed.”
- Using WebClient or WebRequest to login to a website and access data
- Using CookieContainer with WebClient class
- How to post data to specific URL using WebClient in C#
- Deciding between HttpClient and WebClient
- Sending http requests in C# with Unity
- Send a file via HTTP POST with C#
- How to change the timeout on a .NET WebClient object
- HttpWebRequest using Basic authentication
- How do I use WebRequest to access an SSL encrypted site using HTTPS?
- Making a cURL call in C#
- GETting a URL with an url-encoded slash
- How to get the file size from http headers
- How do I log into a site with WebClient?
- URL mapping with C# HttpListener
- C# HttpWebRequest command to get directory listing [closed]
- Easiest way to read from a URL into a string in .NET
- How to read values from the querystring with ASP.NET Core?
- Cannot set some HTTP headers when using System.Net.WebRequest
- C# WebClient disable cache
- HttpWebRequest is extremely slow!
- Multipart forms from C# client
- POSTing JSON to URL via WebClient in C#
- Getting Http Status code number (200, 301, 404, etc.) from HttpWebRequest and HttpWebResponse
- WebClient accessing page with credentials
- Test if a website is alive from a C# application
- Characters in string changed after downloading HTML from the internet
- Uncompressing gzip response from WebClient
- Kanji characters from WebClient html different from actual Kanji in website
- PATCH Async requests with Windows.Web.Http.HttpClient class
- Download file with WebClient or HttpClient?
- ASP.NET Controller: An asynchronous module or handler completed while an asynchronous operation was still pending
- Making a web request to a web page which requires windows authentication
- How to make my web scraper log in to this website via C#
- Is it possible to transfer authentication from Webbrowser to WebRequest
- How do I authenticate a WebClient request?
- Requesting html over https with c# Webclient
- The notorious yet unaswered issue of downloading a file when windows security is required
- How do I create a directory on FTP server using C#?
- Using WebClient in C# is there a way to get the URL of a site after being redirected?
- How to ignore a certificate error with c# 2.0 WebClient – without the certificate
- Create HTTP post request and receive response using C# console application
- How to fill forms and submit with Webclient in C#
- How do I Async download multiple files using webclient, but one at a time?
- Accept Cookies in WebClient?
- JsonConvert.DeserializeObject (string) returns null value for $id property
- C# webclient and proxy server
- WebClient runs javascript
- Which versions of SSL/TLS does System.Net.WebRequest support?
- “A connection attempt failed because the connected party did not properly respond after a period of time” using WebClient