How to add NetworkCredential?

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
 
O

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
 
F

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top