asp.net application that manages an ftp server - asp.net

I have a requirement to build an application that a company can use to manage an ftp server. The idea is that through the web app, they can create users which will also create an ftp space etc so that the user can then upload documents and files to the company. The requirement is specifically that clients can use an ftp program and the company manages it through a web application.
I know Plesk provides an API which could be used by an asp.net application, as well as being able to work with IIS directly etc
however, can anyone suggest:
- a .net library that makes this straight forward (or just tell me that IIS is the best way to go)
- a package that does this (even if it costs)
- an alternate ftp server (not the IIS one) that may make this easier
- examples of .net code managing the IIS ftp server
- "just use plesk"! but really, plesk has too much in it, really I just want the ftp management part of plesk
assume it would be running on a windows server with complete control...I was just presuming that I'd interact with the IIS ftp server but cannot find any real examples of managing the ftp side of things (mind you, searching FTP IIS and .Net etc gives a real mixture of results)
thanks heaps!

(do you always find stuff after you ask?)...
This looks exactly what I'm after...
http://learn.iis.net/page.aspx/285/provisioning-sample-in-c/#CreateFTP
But I'm still open to what's out there...has anyone implemented code similar to this?
This would be the best place to start with IIS7: http://msdn.microsoft.com/en-us/library/microsoft.web.administration%28v=VS.90%29.aspx

we've recently started using WinSCP's (winscp.net) scripting/command-line interface (CLI) from Windows Scheduled Tasks calling standard Windows batch files, but i noticed they also have a howto for c#:
C# example link: winscp.net/eng/docs/guide_dotnet#full_c_example

Related

How to make a webservice publicly accessible on the internet

I finally finish my web services, I have test with local host and in my network now what I'd like to do is send my web service to be uploaded to the internet.
I wrote my web service in C#, asp.net using the nodepad (and not using visual studio), also I use IIS for the localhost, so the files i have in my virtual directory are:
Web-Based Service Consumer: WebApp.aspx
FirstService.asmx
FirstService.cs
FirstService.dll
Now in localhost works great, but I have no idea of how to publish on the internet. Can someone explain or send a guideline, let me remember that i am not using Visual Studio (and dont want to, don't ask why).
The only thing I know is that I have to have a server working with IIS. Is this true?
Yes now you need to pay for an IIS hosting account to serve your files remotely for the world to see.
For example:
http://uk.godaddy.com/hosting/web-hosting.aspx
They will probably give you an FTP account where you can upload your files and some sort of web interface for you to configure the server. If you talk to them, I'm sure they can walk you through it.
Good luck.

VB.net and SFTP to download a file to a client

I'm working on an ASP.net web application that is written in VB.net
I need to download a file from the server that the web app is hosted on, to a UNIX client.
What is the best way for me to go about this?
I have a similar setup where i simply use the "wget" command. I also have another system where security is more of an issue, so I wrote a client program in C++ to connect with sockets.
Those are your two major avenues though... unless I'm missing requirements you haven't mentioned...

Want to run my own server instance with special port for an ASP.Net 4 based solution

I have made an application in asp.net which sends and receive sms, it works very similar to desktop application and it will be installed on servers to send sms alerts, but the problem is if server does not have iis, it will not work. I have seen many apps which when installed, have their own server and port, you do not need to install any IIS, when you just double click it starts running on a special port and works well, similarly visual studio also runs its own port in development mod, so what is the best way to make such solution for an asp.net product.
If you're talking about how to host a service in an application outside IIS, Windows Communication Foundation (WCF), which allows you to host a service in a Windows Forms executable, Console Application, Windows service, or IIS.
It's too big a subject to explain fully here, but there's a nice starting point here.
This will allow you to create the host, and allow you to hose services similar to web services, but with more options for how to connect. (http, tcp, etc.)
But it's not an ASP.NET host. For that, you will need a web server that can execute ASP.NET, such as IIS. There's no way to get around the need to have a web server, whether it's one of the many already established, or if you write your own. I believe there are extensions for Apache that allow you to do so via Mono, but I've never used them. Writing your own would be, in my opinion, a waste of time and a bad idea.
The simplest solution by far is to specify that IIS instaled with the appropriate framework is a requirement for using your website.
Edit
However, if you REALY want to write a WinForms app and have it host ASP.NET, it looks like this previous question has an answer that would help. You can use the Cassini web server, the same one that Visual Studio uses.

Synchronization between Two SQL Server Databases, Online and Offline

We have a local intranet based Project Management tool, we built it in asp.net .net 4.0 and sql server 2008. We cannot access this system online as it is lan based, neither we want its files to be appear online. But most of the cases we and other managers need to post project on it from home, but the issue is we dont wana use this system only on online server but also local intranet should be working, live ip is not prefered in any case because of electricity issues etc. We have an idea in our mind, that if we launch the same published site on online server (dedicated vps), and people use to work on offline system, but we can make some .exe utility which will upload our latest records from offline server to online server using the internet, does sql server provide any built in functionality for this, what is the best way to do this, either with our own custom logic with windows task scheduler or .Net provides any kind of facility for that. The reason of not using this system only as online is, our employees used to upload files in GBs, and the internet is only 4MBps, which will slow down the work, also we dont want internet dependency every time, also there is security issue.
Regards
Atif
Check out Microsoft Sync Framework: http://msdn.microsoft.com/en-us/sync/bb736753

Newbie Trying To Deploy Asp.Net Website

I'm basically wondering what the best way to deploy an Asp.Net Web Site is, mostly from the point of view of security. Right now, I'm trying to publish the website using Visual Studio 2010. Could someone direct me to a good tutorial on how to do this securely? For example, can it be done over an encrypted connection via Visual Studio? Is it necessary to install any software on the server to do this? Should I use a different program to open up an SSL (TLS) connection first, and if so, which program (does it come standard with windows)?
The server is running Windows Server 2008. Development is on Vista.
Many thanks in advance for any direction in this matter!
Andrew
I would publish the site to your local machine and file copy the files across to your test/production environment. As a rule we don't publish sites straight from VS to test or production.
For example you don't want to accidentally push things straight from dev into a live environment do you?
As far as the file transfer security goes you could use SFTP.
Note: First thing is to check with the owner of the server, as they often will provide you an FTP connection and will take care of configuring IIS.
If you want to add security, make a keyfile and sign your assemblies and consider running Dotfuscator on your dlls, the community edition is included in Visual Studio. Here is an earlier question where I've put more info on Dotfuscator.
If you have to do the deployment yourself, here's a few things to consider.
XCopy (easy)
MSI (have to create a setup program, you can do this easily in Visual Studio)
There is no security advantage in deploying using Visual Studio, but you can use Visual Studio to create a small setup program. One thing you want to make sure for security is DO NOT deploy any .cs files. Prepare your files, you should compile in Release mode, make sure debug is not enabled in your config file, keep your bin and it's dll, also the aspx, asmx, ascx, svc, css, js, and config files.
XCopy: Install a small FTP server, or use one your company alreayd has, this will allow you to get your files once you are logged into the target machine. You should be able to get an administrator account for the target machine, just ask the sysadmin of the domain, then log on using remote desktop, got to your ftp site, and download your files. Open IIS on the target machine, create a virtual directory and a pool. Copy your files to the location, configure your connection string to your DB if you use one, then test your website.
MSI: same process as above, except the setup will create the virtual directory and pool for you.
Here is extra info on best practices from the official ASP.Net website.
If you have some control on the server (e.g. to configure IIS7), you might want to look into Microsoft Web Deploy (new product just been released):
http://weblogs.asp.net/scottgu/archive/2010/09/13/automating-deployment-with-microsoft-web-deploy.aspx
Haven't tried it myself, but looks quite slick and it apparently encrypts the data being copied up, so might suit you.

Resources