Click here to Skip to main content
16,007,443 members
Home / Discussions / C#
   

C#

 
GeneralRe: this is the problem Pin
Christian Graus17-Jan-05 9:02
protectorChristian Graus17-Jan-05 9:02 
GeneralRe: JPEG image processing with C# Pin
Heath Stewart16-Jan-05 9:48
protectorHeath Stewart16-Jan-05 9:48 
GeneralRe: JPEG image processing with C# Pin
Christian Graus16-Jan-05 11:35
protectorChristian Graus16-Jan-05 11:35 
GeneralRe: JPEG image processing with C# Pin
memoboy16-Jan-05 10:01
memoboy16-Jan-05 10:01 
GeneralRe: JPEG image processing with C# Pin
Christian Graus16-Jan-05 11:37
protectorChristian Graus16-Jan-05 11:37 
GeneralRe: JPEG image processing with C# Pin
Heath Stewart17-Jan-05 6:05
protectorHeath Stewart17-Jan-05 6:05 
GeneralTransfer Files Pin
Sakkijha16-Jan-05 6:39
Sakkijha16-Jan-05 6:39 
GeneralRe: Transfer Files Pin
Heath Stewart16-Jan-05 9:08
protectorHeath Stewart16-Jan-05 9:08 
You need to use a NetworkStream, which is documented in the .NET Framework SDK class library[^].

You can obtain a NetworkStream from using a TcpClient or a plain Socket connection. You can also obtain one from WebResponse.GetResponseStream. Pluggable protocol handlers that extend WebRequest and WebResponse like the HttpWebRequest and HttpWebResponse class, respectively, communicate across channels (like HTTP for the HttpWebRequest class, obviously) and allow you to stream both request and response data.

Look at the classes available in the System.Net and System.Net.Sockets namespaces in the .NET Framework, which I've linked above and is installed by default with VS.NET. It's also available as a separate download from http://msdn.microsoft.com/netframework[^].

If all you need to do is copy a file from a network share you can use File.Copy. If the user has permissions the file will copy across the network to the destination location just like how files are copied when using Windows. If the user does not have permissions and you need to impersonate a use who does (which requires that you prompt for credentials), then read about the WindowsIdentity.Impersonate[^] method.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralObjects Performing Maths Functions Pin
Wayne Phipps16-Jan-05 4:42
Wayne Phipps16-Jan-05 4:42 
GeneralRe: Objects Performing Maths Functions Pin
Heath Stewart16-Jan-05 6:26
protectorHeath Stewart16-Jan-05 6:26 
GeneralWindows logon Pin
WillemM16-Jan-05 3:03
WillemM16-Jan-05 3:03 
GeneralRe: Windows logon Pin
Heath Stewart16-Jan-05 6:20
protectorHeath Stewart16-Jan-05 6:20 
GeneralRe: Windows logon Pin
WillemM16-Jan-05 6:41
WillemM16-Jan-05 6:41 
GeneralRe: Windows logon Pin
Heath Stewart16-Jan-05 9:00
protectorHeath Stewart16-Jan-05 9:00 
GeneralRe: Windows logon Pin
WillemM16-Jan-05 20:21
WillemM16-Jan-05 20:21 
GeneralMove control at runtime Pin
M4tt16-Jan-05 2:56
M4tt16-Jan-05 2:56 
GeneralRe: Move control at runtime Pin
Mazdak16-Jan-05 6:10
Mazdak16-Jan-05 6:10 
Questionhow to create a (splitter?)bar as in outlook 2003... Pin
just_starting16-Jan-05 2:45
just_starting16-Jan-05 2:45 
AnswerRe: how to create a (splitter?)bar as in outlook 2003... Pin
Heath Stewart16-Jan-05 9:09
protectorHeath Stewart16-Jan-05 9:09 
GeneralRe: how to create a (splitter?)bar as in outlook 2003... Pin
just_starting17-Jan-05 4:45
just_starting17-Jan-05 4:45 
GeneralRe: how to create a (splitter?)bar as in outlook 2003... Pin
Heath Stewart17-Jan-05 5:57
protectorHeath Stewart17-Jan-05 5:57 
AnswerRe: how to create a (splitter?)bar as in outlook 2003... Pin
Craig G Fraser17-Jan-05 23:42
Craig G Fraser17-Jan-05 23:42 
GeneralIP Input Custom Control Pin
Hercules0116-Jan-05 1:26
Hercules0116-Jan-05 1:26 
GeneralRe: IP Input Custom Control Pin
Judah Gabriel Himango16-Jan-05 12:33
sponsorJudah Gabriel Himango16-Jan-05 12:33 
GeneralNetworkStream Pin
alexiev_nikolay15-Jan-05 23:58
alexiev_nikolay15-Jan-05 23:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.