Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I want to read a text file that I've created on UNIX server from a dotnet application.
I'm using
C#
WebRequestMethods.Http.Get
to read but I'm not sure how to provide the physical path...currently I'm just using:
FileWebRequest request = CreateHttpWebRequest(Path.Combine(@"//", "server/folder/"), "userName", "password", true);


I'm getting a network not found error.
Please advice.
Thanks.
Posted
Comments
Kornfeld Eliyahu Peter 12-Jan-15 2:44am    
Do you know the actual path in the network? Does the path accessible from your system with common tools (command line, file browser)?
Member 9790797 15-Jan-15 1:56am    
That seems to be the issue. I was able to connect to UNIX via telnet.
Thanks.

1 solution

Personally, I woudln't use HTTP at all, I'd use FTP (that is what it's meant for, after all)
Either via the FtpWebRequest class[^] or via a library: Simple C# FTP Class[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900