I was referring to the System.Net.WebClient. You can send a post message to
a client with this class, I believe you can modify the headers, it's been a
while since i've used it.
> Thanks ... however I am aware of this, but the Credentials technique
> (discussed int the link you kindly prvided) passes the credentails at the
[quoted text clipped - 58 lines]
>> >>> >
>> >>> > Any clues ..?
Thanks Jared, however I'm not using a web client, I'm using Windows Forms
client(and I've tried a console client to keep things simple with the same
results). I have only have the web reference. So I think I need to be able
somehow to get the web request object and from there access the Http Request
object and from there be able to set the contents of the http header ???
Anyone any clues or examples on how to do this? It's the same problem as my
orginal question however I'm not getting any closer it seems.
When I use a Java client, it's really easy to set the http AUTHORIZATION
attributes. Not so apparently in .Net. This is so basic I'll bet the answer
is really easy but it has me stumped :)
Pete
> I was referring to the System.Net.WebClient. You can send a post message to
> a client with this class, I believe you can modify the headers, it's been a
[quoted text clipped - 62 lines]
> >> >>> >
> >> >>> > Any clues ..?
Jared - 13 Sep 2004 11:29 GMT
Pete,
I'm not talking about a browser or a web page, I too am talking about a
.NET WinForms application. Take the following code snippit for example:
Sub PostAMessage()
Dim Site As String = "http://www.yoursite.com"
Dim Web As New System.Net.WebClient
Web.Headers.Add("AUTHORIZATION", "SOMEVALUE")
Dim Stream As System.IO.Stream
Stream = Web.OpenRead(Site)
Dim Reader As New System.IO.StreamReader(Stream)
Dim Output As String = Reader.ReadToEnd()
Stream.Flush()
Stream.Close()
Reader.Close()
End Sub
This code is declared and used inside a windows application. The name of the
object I have been referring to is WebClient. You may want to see if it can
handle what you are trying to do.
Jared
> Thanks Jared, however I'm not using a web client, I'm using Windows Forms
> client(and I've tried a console client to keep things simple with the same
[quoted text clipped - 89 lines]
>> >> >>> >
>> >> >>> > Any clues ..?