This is a mirror of official site: http://jasper-net.blogspot.com/

C#/.NET Network File System (NFS) Server

| Wednesday, January 4, 2012
Introduction

This article provides a basic description of an NFS server implemented in C# 1.0. This was written about 8 years ago to address a problem present at the time and also as a vehicle to learn C#. This means none of the collections are generic based plus it's beginner code, so please don't be too critical. It works and has been used in personal production mode though it can get into an erroneous state which can presently only be fixed by restarting the process. Importantly, it supports the creation and use of UNIX Symbolic Links. It does not implement any form of security and is limited to version 2 of NFS and only running over UDP. As such it should be considered a prototype but if there is a need to access a Windows machine via NFS, then it may form a stop-gap solution.

It was quite a long time ago that the research was performed and the code written. Therefore a lot of this article is based on what I can remember and from a quick perusal of the source.

The reason I'm writing this article and making the code Open Source is that recently I had reason to review the NFS Server project. It more or less works and there didn't seem to be a C# Open Source NFS Server available.


Background

I was working on a cross-platform (Windows and many flavours of UNIX) application. The primary development environment was Windows but all the code needed to be compiled and tested on UNIX. The easiest way to accomplish this was to use Linux running on VMWare hosted on a Windows machine. This would allow the virtual Linux machine to access the source code on the primary Windows machine using SAMBA to access a SMB/CIFS share. Unfortunately the build environment for UNIX created symbolic links. These were not supported by either the SAMBA client or SMB. This left three alternatives. Firstly, host the source on Linux and use SAMBA in server mode to share it. This didn't appeal as 8 years ago the resources on the Windows machine weren't sufficient to keep a background VM running all the time. Secondly, a 3rd party NFS server could be used but one wasn't available, at least for a small cost. The final option was to write one, plus it was also a meaty project to test out my C# skills.

Read more: Codeproject
QR: NFSServer.aspx

Posted via email from Jasper-net

0 comments: