httpwebrequest

Sending POST data with GET request valid?

Using Curl for example, I can "post" data in a GET request. Is this a valid thing to do? With that I mean: Is it not forbidden by any RFC specification? Does someone out there use it with good reason? Thanks for any help. ...

How can you add a Certificate to WebClient (C#)?

I know it is pretty simple to add a certificate to a HttpWebRequest. However, I have not found a way to do the equivalent using WebClient. Basicly, I want to send out a POST with a specific certificate using WebClient. How would you accomplish this exact code using WebClient: var request = (HttpWebRequest) WebRequest.Create("my-ur...

Using HttpWebRequest to send HTML to a Browser

how can i send message back to the browser or localhost for example if i want to display message called.... This is test in browser. using System; using System.IO; using System.Net; using System.Net.Sockets; using System.Text; class MyTcpListener { public static void Main() { try { // Set the TcpListener on...

HttpWebRequest and Uri change requestUri

Hi fellows, I have one problem with HttpWebRequest and Uri class of .NET framework (i use 3.5 version). When i try to do a simple request to page with url like this http://somedomain.net/-hello-world:misc./Items.bok, Uri remove "." before last "/". Is there any ability to prevent it. Thanks in advance. ...

Uploading to imgur.com

I dontknow if any of you know, but imgur.com is a image uploading website. They do offer an API to upload to their server. Information at: http://code.google.com/p/imgur-api/wiki/ImageUploading so now, my code looks exactly like the PHP code they provide as an example. however, in their php code they are http_build_query($pvars); I g...

Out of Control HTTPWebRequest

I've got a Browser Helper Object written in C# that makes a HTTPWebRequest POST to my server when the user clicks a button on a windows form, and in the normal case this works great. However, every so often, I'll get a BHO that seems to go crazy and continually send me a huge number of HTTPWebRequests (around 50 to 100 per minute). The...

Webrequest.BeginGetResponse is slow - alternative to verifying destination exists before getting blocked on Async call?

I'm having this situation: http://stackoverflow.com/questions/1232139/webrequest-begingetresponse-is-taking-too-much-time-when-the-url-is-invalid However I notice that the PING command doens't take the same amount of time. Anyone know the equivalent .net call that ping is making? ...

How large can a HTTP form parameter string be?

How large can a HTTP form parameter string be? If I want to pass say a couple of pages worth of XML will a form parameter be ok? Or if not would I need to treat it as a file upload to be sure? Thanks ...

WebPermission Exception even though I'm in Full trust...

Hello I'm trying to do what I thought was a simple HttpWebRequest (the code is deep inside a dll so I can't give a small code snippet, but it should be relatively simple), but I'm getting a security exception: System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Cultu...

.NET HttpWebRequest HTTPS Error

Hello I'm trying to fetch data from a https web (i'm not behind firewall or proxy) however even accepting all certificates it keeps throwing System.Net.WebExceptionStatus.SecureChannelFailure with the message shown: Cancelled the request: Unable to create a secure SSL/TLS channel ... i've looked everywhere so you guys are my last chance....

POST to Page Returned By WebResponse

I am using WebRequest to POST to a signin page that redirects me to the page I really need to post to. How can I post to this page that I have been redirected to? Here is the Code: *NEW STUFF*** Here is what is happening after I post to the login page: GET /config/validate?.src=flickr&.pc=5134&.scrumb=6l14Ni2Pz3j&.pd=c%3DE0.GahOp2e4Mj...

Can I "pass" an object with a JSF param tag?

What I'm looking for is to have an f:param tag with an Object of my own choosing in the value attribute. Then, in the backing bean method for the action, I would like to be able to pull this Object from the request. (Sorry if my terminology isnt so good, I'm new to JSF). Now, I can pass Strings around in request parameters just fine. I ...

Is SQL Injection possible with POST?

Sql Injection is possible if parameters are passed via GET. But is it possible via POST also. If yes, can https prevent it? ...

How do I determine the "strength" of an SSL connection

I have a rich client application that is connecting to a set of backing web services where the connection is secured by SSL. I need to determine the "strength" of the encryption being used for the actual SSL stream to display this information to the end user. My understanding is that the client and server will negotiate a symmetric enc...

HTTP request does not reach the server occasionally. Why?

We host our web-service on a dedicated server. Sometimes (I'd say 1 out of 20) a response is not received from the server. That makes the browser fallback with time-out error. An important detail: the request is not logged by Apache in this case. There is no load on Apache, there are a lot of free memory and CPU power left. [UPDATE] I...

StreamReader ReadToEnd() after HttpWebRequest EndGetResponse() - most scalable?

I am calling a RESTful web service in the back-end of some ASP.NET pages. I am using ASP.NET asynchronous pages, so under the hood I am using the methods: HttpWebRequest BeginGetResponse() and HttpWebRequest EndGetResponse() The response string in my case is always a JSON string. I use the following code to read the entire s...

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... ...

Android Read contents of a URL (content missing after in result)

I have the following code that reads the content of a url public static String DownloadText(String url){ StringBuffer result = new StringBuffer(); try{ URL jsonUrl = new URL(url); InputStreamReader isr = new InputStreamReader(jsonUrl.openStream()); BufferedReader in = new BufferedReader(isr); ...

POST HTTP request from j2me

I am making an HTTP request from a j2me application for CDC. The GET request method woks just fine but when i am using the post method i get the message: Status Line Code: 413 Status Line Message: Request Entity Too Large The message that i am sending is only 5 characters long so i don't know which is the problem. The code is listed ...

How to specify a timeout value on HttpWebRequest.BeginGetResponse without blocking the thread

Hi all … I’m trying to issue web requests asynchronously. I have my code working fine except for one thing: There doesn’t seem to be a built-in way to specify a timeout on BeginGetResponse. The MSDN example clearly show a working example but the downside to it is they all end up with a SomeObject.WaitOne() Which again clearly state...