Where can I find a C#/.NET NFS implementation? - c#

Is there any implementation of the NFS protocol written in C# or a good documentation thats easy to read so I can implement my own..
Both server and Client are needed but the client doesn't have to be C#, there must be some thing out there?

Assuming you weren't looking at this as a learning experience I would have suggested taking a C++/C implementation and wrapping it via C++/CLI.
However the only mention of an open source windows client for NFS 4 is this project with the financial support of MS and the university who wrote the reference implementation for many other OS's
That that this is their statement of intent and suggests a two year project sorry.

Hi you can check at my open source project http://code.google.com/p/nekodrive
You can use directly NekoDrive.NFS c# library that wraps my implementation
of V2 e V3 NFS Protocol (V4.1 is coming).. It doesn't support the full protocol yet but It works for basic browsing/download/upload functions..
hope this helps

You could try porting Alfresco JLAN Server to C#. It's written in Java but the two languages are very similar.
Alfresco JLAN uses a virtual file
system interface that allows you to
plug in your own file system
implementation with the core server
handling all of the network protocol
exchange between the client and
server. JLAN is also the only Java
implementation of Window’s CIFS
(Common Internet File System), in
addition to supporting NFS and FTP.
http://www.alfresco.com/products/aifs/

Given that NFS is based on ONC RPC and XDR, I recommend using an XDR implementation for C#, such as RPC.NET.

I recommend starting with the latest stable source code of NFS, and then run it from Cygwin (see below). You would then start with a fully-functional well-tested NFS client and server, which you could then tweak as you desire.
Try this site: Cygwin NFS Server HOWTO

Here is a remotetea port that seems to work http://sourceforge.net/projects/remoteteanet/

These links may help:
The first is a Code Project article describing an implementation of a C# NFS Server
http://www.codeproject.com/KB/IP/NFSServer.aspx
The second is the public github repo. that contains the source
https://github.com/petebarber/NFS

I've started an NFS v2 server based on jnfs (a java implementation of an NFS server) in C#.
The project is hosted on github here https://github.com/shellscape/Snarf

Related

How to use SFTP to submit/retrieve batch jobs to mainframe

I have been making a simple ftp of my JCL after sending site filetype=jes with my C# code.
However now I am required to use SFTP to send and receive files.
I found renci.SshNet but it does not have a method to send command.
Can someone please tell me how I can SFTP a JCL to mainframe using C#?
What is the best method to go about this?
SFTP (not to be confused with FTPS) is not supported by .NET out of the box. You have to rely on a 3rd party library. See related question here: SFTP Libraries for .NET
The answer for your stated problem is that you need FTPS and not SFTP to support JES extensions for job submission and retrieval (as well as other z/OS specific capabilities).
Here is an article that goes over the details of FTPS in c#. Its the same command sequence using the SITE command as you used under FTP.
For a comparison of SFTP and FTPS here is some information.
Found this link about FTPS setup on z/OS from Share. This should get you started. It seems more practical and applied than going to knowledge center and shows the various options and capabilities. The original author, Alfred B Christensen, is an IBMer. The material is from 2011 but is still mostly applicable today.
Here is a comparison of the technologies:
Here is some more background.
The issue is that ...sftp understands a set of commands subcommands similar to those of ftp. according to the linked IBM manual for SFTP. The sftp server implementation provided by IBM does not have the full set of extensions provided by the FTP Server
There are other servers out there with associated clients that can provide the capability. I'm not endorsing this product but it seems to be popular from google searches I've done Tectia The default implementation of sftp server from IBM does not support the same extensions that ftp does.
If you're looking for a seamless transition and need transport security ftps is a better option but likely requires configuration on the z/OS system if its not already enabled.
The issue is not simply the client, it is the capability of the sftp implementation on z/OS as well.
The native SFTP from IBM does not support all the features of FTP. You will need to use Co:Z toolkit SFTP from Dovetailed. It's free to use with paid support available.

Check if 3270 connection to mainframe is available from C#?

My company has an outsourcing partner that hosts data on a z series mainframe. Data is not in db2 but in some older structures. I guess vsam tables, if I haven't misunderstood those mainframe guys. We don't have ih-house knowledge of the mainframe technology. When we talk to partner's mainframe guys it sounds like they speak foreign language. We don't understand them, they don't understand us. PC world and mainframe world are quite different, yeah.
We access data through 3270 terminal emulator (IBM Persona Communications).
Teminal emulator does not connect directly to mainframe but rather to HIS 2000 Server (Microsoft Host Integration Server). HIS talks SNA to mainframe while clients talk tpc/ip to HIS server. We have an internaly developed helpdesk software (writen in c#) that monitors availability of other systems. Now we have request to extend the solution to monitor availability of the mainframe. The idea that we have is to start a 3270 session from our code. If connection suceeds system is available if not it's not available. We don't need to log in to mainframe and access any data there, just check if 3270 connection opens. I know this doesn't mean that actual data is available (sometimes data is locked by batch jobs and we can't access it even though system is up and running) but this approach is good enough for us. Could you point me to some documentation or existing projects? Can we use HIS or Personal Communications libraries. I haven't found any documentation on it.
Well, I finally got it.
I'm using Personal Communication api.
All functions exist in two dlls - pcsapi32.dll (pcsapi functions) and pcshll32.dll (ehllapi functions) that are part of Personal Communication installation.
Everything is well documented in IBM documentation that can be found on
http://publib.boulder.ibm.com/infocenter/pcomhelp/v5r9/index.jsp?topic=/com.ibm.pcomm.doc/books/html/emulator_programming07.htm
or downloaded as pdf.
I had to p/invoke native windows functions and had no problems with it. Tried to use host access code library automation objects but had some issues with it and gave up.
Found usable code example at codeproject site http://www.codeproject.com/KB/cs/all_ehllapi.aspx
I am not sure if the solution I have would work for you. I used IBM PC Communicator Emulator and connected it to MS Excel using the APIs available for it. You can have a look at the APIs coding documentation here - http://publib.boulder.ibm.com/infocenter/pcomhelp/v5r9/index.jsp?topic=/com.ibm.pcomm.doc/books/html/emulator_programming07.htm.
If you need sample code to connect to MF from Excel via 3270 Emulator please let me know, I can provide the same to you.
Regards,
Nitin
nsrivastava2 [at] gmail.com

Subversion Protocol

I'm researching the feasiblity of building the ability to browse a subversion repository from my web app. I'm developing in asp.net. I've read some mentions of WebDAV, but nothing that seems particularly concrete. Does anyone know anything about the protocol that is used to communicate with SVN? Or even better, a .net library that can do so.
I think I may have answered my own question...
Edit: There is a new url:
http://sharpsvn.open.collab.net/
Subversion can serve repositories using 2 different protocols. The svn:// protocol is used by svnserve, the custom Subversion server. The http:// protocol is used by the Apache version of Subversion. Apache provides the webDAV functionality that you see with HTTP.
I created a library to work on the server part. It will do stuff like
Add and delete users
Change user's passwords
Create and delete repositories
Create and delete directories
It's called SVNManagerLib and I'm hosting it at CodePlex.
http://svnmanagerlib.codeplex.com
I've used it for a couple Winform apps, but I've also used it with WCF. It only works with svnserve configurations. I haven't had time to add Apache related functionality.

Embedded Web Server in .NET

I would like to embed a light weight web server in a Windows application developed in .NET. The web server has to support PHP.
I have looked at Cassini, but it seems it is ASP.NET only.
The .net class HttpListener exposes the underlying http.sys upon which IIS is built. All machines since Windows XP2 have http.sys installed by default.
Here are some links to get you started.
XML-RPC SERVER USING HTTPLISTENER
HttpListener For Dummies
As for the PHP support, I don't know how you would enable this, but there is no technical reason you couldn't build it in.
I would look at the likes of XAMPP Lite which you could easily start up and shutdown with your application.
There is also AppWeb which claims to be exactly what you are looking for.
You can always use PHP as a CGI application. CGI is well documented, and AFAIK pretty easy to implement. Use Darrel Millers suggestion, and couple it with some CGI magick, and you should be cooking with gas.
Mongoose embedded webserver
https://code.google.com/p/mongoose/
You can build it with VS2012/10/08 as EXE and you can use PHP and also websockets to push data to the client app. Also you can build a DLL you can do this with make or bring the code into a VS DLL project and build out a _DLLMain, DEF file, etc. Then use it direct from C# - see the mongoose.cs and example.cs files.

How can I write an SNMP agent or SNMP extension agent DLL in C#

I need to write an SNMP agent for my application.
I read the CodeProject article on how to write an SNMP extension agent DLL using win32, but would like to know if it is possible to do it with managed code.
Also, is it possible to write my own SNMP agent in managed code and run it along windows SNMP service?
windows SNMP service is required to run on my server to provide the basic operating system management info.
What C# SNMP library would you recommend? I found a few C# SNMP protocol implementations, but could not find sample code on how to implement an SNMP agent - most samples are only about querying other agents or sending traps.
If you would like to use the SNMP protocol from the .Net Framework, regard this library: #SNMP.
It seems possibly to write your own SNMP server with it. But the standard SNMP Agent archictecture is not based on .Net und so - I assume - you cannot use the mentioned library to extend it. You must write your own and this looks possible with the mentioned library.
Hope this help.
br--mabra
the best library I have used in 8
years of NMS development -
adventnet
you can write your own, but you need to understand ASN. Good luck with that.
SNMP agents do 2 things: query for data, send and receive traps. What else you want
them to do? wash your laundry?! (sorry couldn't resist that! :) ).
What are you trying to do with your SNMP agent?! Does you app need to send traps?! or query for data from a node?!

Categories