tags:

views:

151

answers:

2

I have a problem that only occur when I run my application from the IIS.

I am trying to FTP from my ASP.NET application to an external site.

I can FTP from the server in general but not from my application. My request times out.

The owner of my Website is now set to the IIS_IUSRS user with Full control.

Do anyone have ANY idea what might keeps me from succeeding?

Any help will be extremely appriciated.

My Deadline is within 12 hours and I am royaly screwed...

A: 

A quick fix may be setting the anonymous user that IIS uses to your user account instead of the IUSR account (in IIS). It does seem to be a permission problem.

Second bet would be to use a tool like Wiresharck/Etherreal and check if any connection to the FTP site is made, and debug from there.

Thies
Thanks for your reply Thies
The real napster
A: 

I Found the Solution

Windows Firewall and non-secure FTP traffic

Windows firewall can be configured from command line using netsh command. 2 simple steps are required to setup Windows Firewall to allow non-secure FTP traffic

1) Open port 21 on the firewall

netsh advfirewall firewall add rule name="FTP (no SSL)" action=allow protocol=TCP dir=in localport=21

2) Activate firewall application filter for FTP (aka Stateful FTP) that will dynamically open ports for data connections

netsh advfirewall set global StatefulFtp enable

I don't really know what that just did but it did the trick

The real napster
FTP uses a bunch of ports when transfering data. The first opens the communication channel for commands - whereas due to dynamic ports used in FTP, the second will watch the FTP trafic and open additional ports as needed.Question, why was this working for everything but within your application? Was it not running on the same machine you did your FTP test with?
Thies