By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,601 Members | 989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,601 IT Pros & Developers. It's quick & easy.

Connecting from Windows to Linux server with C#

P: n/a
Is there a way to connect to the Linux filesystem with C# without using Samba?

I need it to get a configuration file from the server, edit it and place it
back. And after that I need to restart a service, however this is not
difficult since I already have the API's to do this.

Unfortunately I can't find anything about this subject, so I am afraid that
it can't be done...

TIA,
Arjan.
Feb 7 '06 #1
Share this Question
Share on Google+
14 Replies


P: n/a

"Arjan" <Ar***@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
| Is there a way to connect to the Linux filesystem with C# without using
Samba?
|
| I need it to get a configuration file from the server, edit it and place
it
| back. And after that I need to restart a service, however this is not
| difficult since I already have the API's to do this.
|
| Unfortunately I can't find anything about this subject, so I am afraid
that
| it can't be done...
|
| TIA,
| Arjan.

You have to map a drive to connect to the exported SMB share, or use a UNC
path to copy the file back and forth.

Willy.
Feb 7 '06 #2

P: n/a
Hi,

"Arjan" <Ar***@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
Is there a way to connect to the Linux filesystem with C# without using
Samba?

You need Samba in the linux server, that's the only way windows can access
it as a "regular" network drive.

The other way would be using FTP

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 7 '06 #3

P: n/a

Thanks for your quick response, however I mentioned that I don't want to use
Samba (SMB).
"Willy Denoyette [MVP]" wrote:

"Arjan" <Ar***@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
| Is there a way to connect to the Linux filesystem with C# without using
Samba?
|
| I need it to get a configuration file from the server, edit it and place
it
| back. And after that I need to restart a service, however this is not
| difficult since I already have the API's to do this.
|
| Unfortunately I can't find anything about this subject, so I am afraid
that
| it can't be done...
|
| TIA,
| Arjan.

You have to map a drive to connect to the exported SMB share, or use a UNC
path to copy the file back and forth.

Willy.

Feb 7 '06 #4

P: n/a
Well, another other option is to use NFS on linux and "Windows Services for
UNIX" on Windows.
http://www.microsoft.com/windowsserv...s/default.mspx
but you need something, right? Or do you prefer FTP?

Willy.
"Arjan" <Ar***@discussions.microsoft.com> wrote in message
news:7E**********************************@microsof t.com...
|
| Thanks for your quick response, however I mentioned that I don't want to
use
| Samba (SMB).
|
|
| "Willy Denoyette [MVP]" wrote:
|
| >
| > "Arjan" <Ar***@discussions.microsoft.com> wrote in message
| > news:62**********************************@microsof t.com...
| > | Is there a way to connect to the Linux filesystem with C# without
using
| > Samba?
| > |
| > | I need it to get a configuration file from the server, edit it and
place
| > it
| > | back. And after that I need to restart a service, however this is not
| > | difficult since I already have the API's to do this.
| > |
| > | Unfortunately I can't find anything about this subject, so I am afraid
| > that
| > | it can't be done...
| > |
| > | TIA,
| > | Arjan.
| >
| > You have to map a drive to connect to the exported SMB share, or use a
UNC
| > path to copy the file back and forth.
| >
| > Willy.
| >
| >
| >
Feb 7 '06 #5

P: n/a
There is no way that I can use something like NFS?

"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,

"Arjan" <Ar***@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
Is there a way to connect to the Linux filesystem with C# without using
Samba?

You need Samba in the linux server, that's the only way windows can access
it as a "regular" network drive.

The other way would be using FTP

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Feb 7 '06 #6

P: n/a
NFS is good. It is just that I don't really like Samba. And I rather prefer
to use NFS.

"Willy Denoyette [MVP]" wrote:
Well, another other option is to use NFS on linux and "Windows Services for
UNIX" on Windows.
http://www.microsoft.com/windowsserv...s/default.mspx
but you need something, right? Or do you prefer FTP?

Willy.
"Arjan" <Ar***@discussions.microsoft.com> wrote in message
news:7E**********************************@microsof t.com...
|
| Thanks for your quick response, however I mentioned that I don't want to
use
| Samba (SMB).
|
|
| "Willy Denoyette [MVP]" wrote:
|
| >
| > "Arjan" <Ar***@discussions.microsoft.com> wrote in message
| > news:62**********************************@microsof t.com...
| > | Is there a way to connect to the Linux filesystem with C# without
using
| > Samba?
| > |
| > | I need it to get a configuration file from the server, edit it and
place
| > it
| > | back. And after that I need to restart a service, however this is not
| > | difficult since I already have the API's to do this.
| > |
| > | Unfortunately I can't find anything about this subject, so I am afraid
| > that
| > | it can't be done...
| > |
| > | TIA,
| > | Arjan.
| >
| > You have to map a drive to connect to the exported SMB share, or use a
UNC
| > path to copy the file back and forth.
| >
| > Willy.
| >
| >
| >

Feb 7 '06 #7

P: n/a
you have to find if there is a NFS driver for windows, I bet there are, not
sure if they are free though.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Arjan" <Ar***@discussions.microsoft.com> wrote in message
news:A0**********************************@microsof t.com...
There is no way that I can use something like NFS?

"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,

"Arjan" <Ar***@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
> Is there a way to connect to the Linux filesystem with C# without using
> Samba?

You need Samba in the linux server, that's the only way windows can
access
it as a "regular" network drive.

The other way would be using FTP

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Feb 7 '06 #8

P: n/a
"Windows Services for UNIX" has both NFS server and client, and is freely
downloadable (need to register).

Willy.
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:uY**************@tk2msftngp13.phx.gbl...
| you have to find if there is a NFS driver for windows, I bet there are,
not
| sure if they are free though.
|
|
|
| --
| Ignacio Machin,
| ignacio.machin AT dot.state.fl.us
| Florida Department Of Transportation
|
|
|
| "Arjan" <Ar***@discussions.microsoft.com> wrote in message
| news:A0**********************************@microsof t.com...
| > There is no way that I can use something like NFS?
| >
| > "Ignacio Machin ( .NET/ C# MVP )" wrote:
| >
| >> Hi,
| >>
| >> "Arjan" <Ar***@discussions.microsoft.com> wrote in message
| >> news:62**********************************@microsof t.com...
| >> > Is there a way to connect to the Linux filesystem with C# without
using
| >> > Samba?
| >>
| >>
| >> You need Samba in the linux server, that's the only way windows can
| >> access
| >> it as a "regular" network drive.
| >>
| >> The other way would be using FTP
| >>
| >>
| >>
| >> --
| >> Ignacio Machin,
| >> ignacio.machin AT dot.state.fl.us
| >> Florida Department Of Transportation
| >>
| >>
| >>
|
|
Feb 7 '06 #9

P: n/a
Just downloaded it. Does it have components that I can use in my application?
Or do I need to completely install it?

"Willy Denoyette [MVP]" wrote:
"Windows Services for UNIX" has both NFS server and client, and is freely
downloadable (need to register).

Willy.
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:uY**************@tk2msftngp13.phx.gbl...
| you have to find if there is a NFS driver for windows, I bet there are,
not
| sure if they are free though.
|
|
|
| --
| Ignacio Machin,
| ignacio.machin AT dot.state.fl.us
| Florida Department Of Transportation
|
|
|
| "Arjan" <Ar***@discussions.microsoft.com> wrote in message
| news:A0**********************************@microsof t.com...
| > There is no way that I can use something like NFS?
| >
| > "Ignacio Machin ( .NET/ C# MVP )" wrote:
| >
| >> Hi,
| >>
| >> "Arjan" <Ar***@discussions.microsoft.com> wrote in message
| >> news:62**********************************@microsof t.com...
| >> > Is there a way to connect to the Linux filesystem with C# without
using
| >> > Samba?
| >>
| >>
| >> You need Samba in the linux server, that's the only way windows can
| >> access
| >> it as a "regular" network drive.
| >>
| >> The other way would be using FTP
| >>
| >>
| >>
| >> --
| >> Ignacio Machin,
| >> ignacio.machin AT dot.state.fl.us
| >> Florida Department Of Transportation
| >>
| >>
| >>
|
|

Feb 7 '06 #10

P: n/a
Hi,

"Arjan" <Ar***@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com...
Just downloaded it. Does it have components that I can use in my
application?
Or do I need to completely install it?


You have to check the doc , I have never used it so I dont know if you can
call an API to mount a remote NFS drive.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 8 '06 #11

P: n/a
I will have some time tonight. So I will give it a shot. Maybe a regular
client-server system is possible too...

"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,

"Arjan" <Ar***@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com...
Just downloaded it. Does it have components that I can use in my
application?
Or do I need to completely install it?


You have to check the doc , I have never used it so I dont know if you can
call an API to mount a remote NFS drive.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Feb 8 '06 #12

P: n/a
You can select some individual components, but why would you, the package is
so small and you might need the other stuff too.
Not sure what you mean with "regular client-server system" though.

Willy.

"Arjan" <Ar***@discussions.microsoft.com> wrote in message
news:98**********************************@microsof t.com...
|I will have some time tonight. So I will give it a shot. Maybe a regular
| client-server system is possible too...
|
| "Ignacio Machin ( .NET/ C# MVP )" wrote:
|
| > Hi,
| >
| > "Arjan" <Ar***@discussions.microsoft.com> wrote in message
| > news:5E**********************************@microsof t.com...
| > > Just downloaded it. Does it have components that I can use in my
| > > application?
| > > Or do I need to completely install it?
| >
| > You have to check the doc , I have never used it so I dont know if you
can
| > call an API to mount a remote NFS drive.
| >
| >
| > --
| > Ignacio Machin,
| > ignacio.machin AT dot.state.fl.us
| > Florida Department Of Transportation
| >
| >
| >
Feb 8 '06 #13

P: n/a
Hi,

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:Ol**************@TK2MSFTNGP11.phx.gbl...
You can select some individual components, but why would you, the package
is
so small and you might need the other stuff too.
Not sure what you mean with "regular client-server system" though.


I think he meant that he want to mount/unmount it from code.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 8 '06 #14

P: n/a
Exactly, what I am trying to do is making an application that can control
MySQL Server on linux and windows. So I need to get access to the
config-file. So I need something to get that done. And I don't really want to
work with shares. So if I can trigger a server app from my client app, I
should be able to edit the config-file. My first idea was to use something
like NFS, but a client-server app might be a better way to do this. Probably
also out of security reasons. The only disadvantage is that you also need to
install a server app.

Arjan.

"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:Ol**************@TK2MSFTNGP11.phx.gbl...
You can select some individual components, but why would you, the package
is
so small and you might need the other stuff too.
Not sure what you mean with "regular client-server system" though.


I think he meant that he want to mount/unmount it from code.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Feb 8 '06 #15

This discussion thread is closed

Replies have been disabled for this discussion.