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

  • SEARCH
  • Home
  • 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 8027013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:40:39+00:00 2026-06-04T23:40:39+00:00

My application accesses internet to download a file from the given link. I am

  • 0

My application accesses internet to download a file from the given link. I am using my institute’s internet connection which uses proxy settings.

For my application to be able to download the file from internet I need to open my internet browser, give the username and password for connection and keep the browser running, only then is my application able to download the complete file, if I don’t do these things my application runs normally and creates a file in the desired place but shows the file size to be zero, which is most likely because it is unable to connect to the internet directly.

How can I make my application show a dialog to me asking for the username and password to connect to internet, if it is unable to.

Thanks 🙂

  • 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-06-04T23:40:42+00:00Added an answer on June 4, 2026 at 11:40 pm

    When you create the connection object through which the file transfer will be effected, you must specify that you are using whatever form of authentication credentials that the proxy is expecting. I don’t know what you’d do in Java for Android, but in .NET I do this:

      LogHandler.Log(LogHandler.LogType.Debug, "Configure proxy credentials");
    
      // Proxy address and port
      ec2Config.ProxyHost = ConfigurationManager.AppSettings["LocalProxyHost"];
      ec2Config.ProxyPort = Convert.ToInt32(ConfigurationManager.AppSettings["LocalProxyPort"]);
    
      // Create a dummy webrequest so we can set proxy credentials (to stop the proxy spitting 407s at us)
      HttpWebRequest dummyRequest = (HttpWebRequest)WebRequest.Create(ec2Config.ServiceURL);
      dummyRequest.Proxy.Credentials = CredentialCache.DefaultCredentials;
    
      #pragma warning disable 168
      HttpWebResponse myHttpWebResponse = (HttpWebResponse)dummyRequest.GetResponse();
      #pragma warning restore 168
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application which accesses a SOAP web service in order to download
I have an application which accesses a flat file filesystem whose structure I have
I am working on an application in which one module accesses a log (an
I am on a network that accesses internet via a proxy. I have a
First some background: VB.NET 2005 Application that accesses a MS-SQL back-end, using multiple Web
I developed a small application which accesses a MS access database on my computer
Using the searchable plugin in Grails (which uses Compass/Lucene under the hood) we're trying
I have an application that accesses a sql server 2008 database. The server and
We have an legacy application that accesses the registry. Because it is a 32bit
I have an internal WPF client application that accesses a database. The application is

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.