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

log in to a site programatically using C#

I want to log in to a website setting.fun-freak.com just for learning purpose by using a windows desktop application. I used webrequest and tried as string formUrl = "http://setting.fun-freak.com/Account/Login.aspx"; string formParams =…
Lali
  • 2,816
  • 4
  • 30
  • 47
0
votes
1 answer

Webrequest work over HTTP but not over HTTPS (SSL)

We have a rest service which works fine over http. I use the following C# code to post data to it: string postData = [contains the data to post] ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; var…
Enrico
  • 1,937
  • 3
  • 27
  • 40
0
votes
0 answers

Submit multipart/form-data?

I've Googl-ed/SO'd to death and still nothing seems to work for me. Everything has submitted fine except for the file. I've tried so many things I don't even have the original code prior to trying to get this darn file to transmit. I've tried…
Ber53rker
  • 1,036
  • 3
  • 17
  • 26
0
votes
2 answers

Detect every request to server using PHP or javascript

Is it possible to get every request to server using Javascript or PHP if javascript not possible ? Thx for helping me...
0
votes
1 answer

404 - not found. But browser can read the url

In my ASP.Net app, I open a request to a url as follows: webRequest = WebRequest.Create(url); response = webRequest.GetResponse(); But the GetResponse returns an exception of: The remote server returned an error: (404) Not Found. The url does in…
Johann
  • 27,536
  • 39
  • 165
  • 279
0
votes
0 answers

Invalid Port, Writing a Client for DynamicDNS

I am just starting to write a client(for me) for Dynamic DNS and have a problem the client should be able to send something like this(their API) https://username:password@www.dnsdynamic.org/api/?hostname=techno.ns360.info&myip=127.0.0.1 so i…
AngelicCore
  • 1,413
  • 3
  • 22
  • 40
0
votes
1 answer

Ignore user input while Uploading to FTP

I'm developing a windows store app, and I'm uploading a file to an FTP server with WebRequest, since it was the only work around I could find, with the limitations that I had. When the application is uploading the video, which takes a few minutes,…
0
votes
1 answer

Login in to a webpage via iOS App

I couldn't find anything helpful about: How do I post login-date (username AND password) and login on the webpage? I know there is AFNetworking, but is there also a solution without it? If not, how do I manage it with AFN ? I can't really get in…
faxemaxe
  • 81
  • 1
  • 4
0
votes
2 answers

Multi-webrequests & WebClient

I'm trying to the html information on a certain a website so I can parse out the info for our database. The problem is that the second & third responseFromServer info comes back the same. However, when I follow the links on inside a real web…
MaylorTaylor
  • 4,671
  • 16
  • 47
  • 76
0
votes
1 answer

WebRequest - how it changes from other requests (like browser and so)

I am using 3rd party services which can logged user and then remembers him until he logged out. I am not sure how they do that. You send GET request with username and password and then if you get OK response you are logged in. You can check that you…
Libor Zapletal
  • 13,752
  • 20
  • 95
  • 182
0
votes
1 answer

StreamReader OutOfMemoryException

I am using a web service that returns xml an I want to read it into a string. I am using ReadToEnd method of StreamReader class but at this moment OutOfMemory Exception occurs because of the large amount of xml data. Is there any way to get this .My…
0
votes
1 answer

Use WebRequest localy causes exceptions

Right now I am working with my first Windows Mobile project and I have an odd problem.. I am using WebRequest to download some images from Internet - on my mobile it works but in debugger I have socket exceptions. string url =…
hsz
  • 148,279
  • 62
  • 259
  • 315
0
votes
1 answer

C# WebRequest Forbidden

using the URL http://myanimelist.net/malappinfo.php?u=fakemudkipper&status=all&type=anime And using the code WebRequest req = WebRequest.Create("http://myanimelist.net/malappinfo.php?u=" + username + "&status=all&type=anime"); WebResponse responce =…
Froodle
  • 339
  • 2
  • 5
  • 15
0
votes
1 answer

Controller is taken from Url although no controller is requested in URL - c# .Net MVC 4

I'm currently working at a .NET 4.5 MVC 4 Web Application. I have got the following Routes: routes.MapRoute( name: "Default", url: "api/", defaults: new { controller = "Response", action =…
SwissPrime
  • 443
  • 1
  • 6
  • 10
0
votes
1 answer

How to set client name and referrer in the Post WebRequest in C#?

How to set client name and referrer in the Post WebRequest in C#?
Priyank Bolia
  • 14,077
  • 14
  • 61
  • 82