Hi, I have the following problem:
I want to protect the access to some files hosted under IIS using an asp.net page.
The page will be called from another application using:
var request = WebRequest.Create("www.smth.com/protectData.aspx")
as HttpWebRequest;
request.Credentials = new NetworkCredentials("john doe", "john");...
I'm trying to improve the information provided in response to an error handled within an app.
This is the code:
Try
httpRequestObj = HttpWebRequest.Create(strRequest)
httpRequestObj.Method = "GET"
httpRequestObj.UseDefaultCredentials = True
* httpResponse = httpRequestObj.GetResponse
Using reader A...
Hi
is there a popular C# library for working HTTP? Eg simplifing working with httpwebrequest etc
For example doing http file upload with some parameters requires many lines and knowledge of Http protocol content format etc. WebClient itself do not do it.
So being new, is there a well know library that c# developers use here?
Thank...
I have a Silverlight application that needs to upload large files to the server. I've looked at uploading using both WebClient as well a HttpWebRequest, however I don't see an obvious way stream the upload with either option. Do to the size of the files, loading the entire contents into memory before uplaoding is not reasonable. Is this ...
Hi,
Background - I'm trying to stream an existing webpage to a separate web application, using HttpWebRequest/HttpWebResponse in C#. One issue I'm striking is that I'm trying to set the file upload request content-length using the file download's content-length, HOWEVER the issue seems to be when the source webpage is on a webserver fo...
Hi,
Background - I'm trying to stream an existing webpage to a separate web application, using HttpWebRequest/HttpWebResponse in C#. One issue I'm striking is that I'm trying to set the file upload request content-length using the file download's content-length, HOWEVER the issue seems to be when the source webpage is on a webserver for...
There is a local service from which I need to consume a generated XML Document Stream. Though the end point is not a REST service per se. I wanted to be sure the method I've outlined below is the most efficient way of getting the response returned into an XDocument.
Uri requestUri = null;
Uri.TryCreate(String.Format(SearchAddress, filte...
Hi guys,
I'm trying to upload a file and a send along a few parameters to my site using .NET / C#. Having read a few tutorials that do either a few parameters or a file, I've tried, unsuccessfully, to combine them. Here is how I try doing it:
WebRequest req = WebRequest.Create(baseURL + "upload");
req.Credentials = new NetworkCredentia...
Can anyone point out a turorial which explains threading?? In my application, i'm uploading some data (even large sized images) to the servelet. The uploading process may take quite a large time depending on the bandwidth, as usual. So i need to implement threading in it so that the uploading process takes place in the background. Any ex...
I'm using HttpWebRequest to log on to a website and get the session cookie. My application scrapes certain pages, and eventually becomes idle, resulting in the session dying.
What would be a good way to prevent this and -just being curious- how do web browsers do it?
...
Greetings, all. Here is my situation. I am attempting to make an HttpWebRequest to a local handler file and I keep getting the following exception:
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
Now, I'm using a local handler file because I am writing some integration...
Hi All,
We are wondering how to use HttpWebRequest and HttpWebResponse .net framework Class in ATL c++ project is their any interface exposed for webrequest class in C++, currently we cannot have a c# project so we are looking for alternative interface.
Any help will be greatly appreciated.
Ramanand.
...
Wondering... I have a test whereby calling abort on a HttpWebRequest asynchronous GET requests seems to make the request abort and return the relevant status code. However for POST requests, calling Abort does not have the same effect. It appears to continue processing the request regardless. Is this by design or am I doing something wro...
I am having a slight issue with the HttpWebRequest protocol, and I am wondering whether I should try a different approach or perhaps I am doing something wrong.
The issue I am having is this. I have a client/server which sends a HttpWebRequest to a server. The server receives this response, then runs a small utility which generates a fi...
I need to be able to tell from within a VB.NET class (not a user control) whether or not the current request is a PostBack and/or CallBack (AJAX). In the past I've been able to get information about the request, response, session, etc through HttpContext.Current but I haven't been able to find the Page object in HttpContext.Current.
Is...
Is there an easier way to write this?
I know if i didnt need cookies i could have done
var sz = new WebClient().DownloadString(url);
But i need cookies bc of login data so i am stuck with this instead. Is there a way to make it short like the line above?
request = (HttpWebRequest)HttpWebRequest.Create(url);
request.C...
Hi,
I'm trying out the twitter streaming api. I could succesfully filter tweets by using curl, as stated here:
curl -d @tracking http://stream.twitter.com/1/statuses/filter.json -u <user>:<pass>
where tracking is a plain file with the content:
track=Berlin
Now I tried to do the same thing in JavaSE, using Apache's HTTPComponents:
...
I have a web application the relies heavily on web services. Everything with the services is done asynchronously and with AddOnPreRequestHandlerExecuteAsync. Anyhow, most of my calls work just fine, but some are returning from their asynchronous service calls to find a null HttpContext.Current.Response/Request object in the endprerequest...
First of all, I'd consider myself a very beginner in services development so pardon my ignorance here...
I've created the rss syndication feed service (rest) in wcf and have problems with the request parameter values character. I need to pass the name as the parameter which contains the characters from the ISO 8859-2..... the request loo...
Hi all
I want to use an HTTPService to load some data (number of columns and number of rows) which change randomly by a certain frequency
I get the string like freq#ncols#nrows#value.
How can i display for example:
1000#21#13#2391 that means: in 21 col, 13 row i have the value of 2391 which changes every 1 second.
Thanks
...