Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6101629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:31:17+00:00 2026-05-23T13:31:17+00:00

I have a simple class in an ASP.NET webservice. It runs fine on my

  • 0

I have a simple class in an ASP.NET webservice. It runs fine on my local system and even on the development environment I’ve set up, but Anytime I try to send a file on the production server I get the following error:

Exception Error: The underlying provider failed on Open.

Here is the code that is being called:

public class FTPHelper
{
        public static string SendFile(string ftpuri, string username, string password, string ftppath, string filename, byte[] datatosend)
        {
            if (ftppath.Substring(ftppath.Length - 1) != "/")
            {
                ftppath += "/";
            }
            FtpWebRequest ftp = (FtpWebRequest) FtpWebRequest.Create( ftpuri + ftppath + filename);
            ftp.Method = WebRequestMethods.Ftp.UploadFile;
            ftp.Credentials = new NetworkCredential(username, password);
            ftp.UsePassive = true;
            ftp.ContentLength = datatosend.Length;
            Stream requestStream = ftp.GetRequestStream();
            requestStream.Write(datatosend, 0, datatosend.Length);
            requestStream.Close();

            FtpWebResponse ftpresponse = (FtpWebResponse)ftp.GetResponse();

            return ftpresponse.StatusDescription;
        }
    }

How can I troubleshoot this issue. The Server is IIS 7.5 running on Windows 2008 Server. I’m using .NET 4.0. Is there a simple reason why the FtpWebResponse would not be working?

If it’s a security issue, then is there any way around it? I need to get this working immediately.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:31:18+00:00Added an answer on May 23, 2026 at 1:31 pm

    It was a security issue, the user that the website was running as did not have permission to establish the FTP connection. I am a programmer and not a web site administrator, so I did not have a clue how to accomplish this. After searching through Microsoft’s IIS help on IIS, finally worked my way through it. The solution to change the user is on SuperUser:

    https://superuser.com/q/307168/68967

    If anyone has any better solutions, please respond. If anyone feels this would open up security issues, also, please post more information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple class in asp.net mvc that looks like this: public class
I have an simple class that I get from a webservice. public class person
I have a ASP.NET web service decorated with System.Web.Script.Services.ScriptService() so it can return json
I'm building a relatively simple class (ex: Person) for an ASP.NET application that has
I have the same ASP.NET WebService deployed 3 times under 3 different URI's configured
I have this simple ASP.NET page here: <%@ Page Language=C# AutoEventWireup=true CodeBehind=Tree.aspx.cs Inherits=CoconutTree.One %>
So I have a simple voting feature on my asp.net mvc page. My index
I have an ASP.NET MVC application that currently uses the WebClient class to make
I have a simple ASP.NET page that users can browse to, select a file
Prehistory: I have a simple ASP.NET MVC3 application. In the project file i've turned

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.