PDA

View Full Version : Change user ip/s from C#/Web?


paja1
09-26-2010, 11:59 AM
Hi all,
i do have sort of a strange question for you guys. Do you have anyone any idea or tip how to allow users to change their IP from SSL/Web running on IIS7/C#?

They can login from anywhere to Web, but FTP is restricted by IP filtering. I do want to allow then to change only one IP to their current one. I'm trying to do that by login on the FTP and calling commands DELIP/ADDIP, it works, but there have to be more elegant way to do that.

Any idea? Thanks in advance for any tip/s.

Pavel

paja1
10-17-2010, 12:23 PM
Noone? Please any suggestion.

Yil
10-19-2010, 12:50 PM
There are several options...

Use a C# FTP script to send raw commands to the FTP to adjust the user's hostmask based upon the IP IIS sees they are connecting from... You aren't limited to addip/delip stuff here, you could simple pass the IP to a custom TCL script you wrote and have that script make any modifications and return what it did. This would allow you to do anything you wanted.

Check out the source/Window.Messages.And.Shared.Memory example and the ioFTPD source code in DataCopy.c to see how to exchange/modify userfiles via shared memory. Then just write a simple C/C++ dll and call that from C# directly.