How to add NetworkCredential?

  • Thread starter Thread starter fj
  • Start date Start date
F

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
 
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
 
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
 
Back
Top