After placing a small text file called test.txt in the root of the FTP site, I got the below code, adapted from your sample, to work on my local machine: string ftpHost = "ftp://localhost/test.txt" įtpWebRequest request = (FtpWebRequest) WebRequest.Create(ftpHost) Ok, now that IIS has been configured, let's look at the code. Open an admin command prompt and type iisreset.option if you have made any changes here, to ensure everything from the root down now has the same access control entries. You may want to use the Replace all child object permissions. To make the change, you may need to disable inheritance from the parent directory-if so, I would recommend copying the existing permissions rather than starting with a blank slate. You may need to add Modify and Write for uploading capabilities. This will let you your code download files anonymously. Most importantly, the IUSR account needs at least the following: Read
0 Comments
Leave a Reply. |