Home All Groups Group Topic Archive Search About

How to add NetworkCredential?

Author
21 Feb 2007 4:06 PM
fj
I use TCPClient object. Is there any way I can add networkCredential object
to the request?

How can I add username, password information on the web request? Again I am
using TCPClient and send byte stream through socket.

thanks in advance
-fj

Author
21 Feb 2007 6:03 PM
Oliver Sturm
Hello fj,

>I use TCPClient object. Is there any way I can add networkCredential object
>to the request?

TCP doesn't know anything about network credentials.

>How can I add username, password information on the web request? Again I am
>using TCPClient and send byte stream through socket.

If you're constructing a web request, you need to look on that layer to
add your credentials. TCP doesn't have anything to do with it - it runs on
a lower layer and doesn't care about higher level protocols that may
include authorization features.

I'm not exactly sure what you're trying to do here - I assume when you
mention a "web request", you are *not* referring to System.Net.WebRequest,
are you?


                Oliver Sturm
Author
21 Feb 2007 10:40 PM
fj
I guess I can switch from TCPClient to WebRequest object.

Do you know if I use the same request btye stream of TCPClient over
WebRequest, will it make different?

Thanks
fj

Show quote
"Oliver Sturm" <oli***@sturmnet.org> wrote in message
news:xn0f2q9gm2h9m9v00g@msnews.microsoft.com...
> Hello fj,
>
>>I use TCPClient object. Is there any way I can add networkCredential
>>object
>>to the request?
>
> TCP doesn't know anything about network credentials.
>
>>How can I add username, password information on the web request? Again I
>>am
>>using TCPClient and send byte stream through socket.
>
> If you're constructing a web request, you need to look on that layer to
> add your credentials. TCP doesn't have anything to do with it - it runs on
> a lower layer and doesn't care about higher level protocols that may
> include authorization features.
>
> I'm not exactly sure what you're trying to do here - I assume when you
> mention a "web request", you are *not* referring to System.Net.WebRequest,
> are you?
>
>
>                Oliver Sturm
> --
> http://www.sturmnet.org/blog

AddThis Social Bookmark Button