Results 1 to 4 of 4

Thread: [2005] Downloading a File error,

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2006
    Location
    UK / East Sussex
    Posts
    1,054

    [2005] Downloading a File error,

    Good afternoon,

    I have made a program and on startup it reads in a file which has all the different version numbers in for all the parts of the application and database files etc.

    I then have the exact same file on my webserver and I want to compare them. Now I have done the following:

    My.Computer.Network.DownloadFile("http://blah.com/blah.txt", "C:\new.txt")

    but it stops working on that line with the following error:

    The remote server returned an error: (407) Proxy Authentication Required

    Now is that on my webserver needs a username and password to download the file or would it be our ISA server in the company requiring Authentication for that traffic. Our ISA server shouldn't need Authentication because we login to the Domain and then have the Microsoft Firewall Client on each desktop that is meant to allow programs to work without authentication so you only have to log on once. If you get what I mean.

    Could someone try and help me to see whats going on,

    Thanks
    M.Carpenter

    Server Admin for Wurm Online
    Wurm Online - A very unique and original MMO from Code Club AB
    https://www.youtube.com/watch?v=YQlYar2uHWAWurm Trailor


  2. #2
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    Re: [2005] Downloading a File error,

    Could you try using a WebClient to download your file and set the proxy setting via that as a quick test?
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2006
    Location
    UK / East Sussex
    Posts
    1,054

    Re: [2005] Downloading a File error,

    I have never used the webclient and not to sure how to go about using it what so ever
    M.Carpenter

    Server Admin for Wurm Online
    Wurm Online - A very unique and original MMO from Code Club AB
    https://www.youtube.com/watch?v=YQlYar2uHWAWurm Trailor


  4. #4
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    Re: [2005] Downloading a File error,

    The formatting of this page isn't great but may help

    http://www.thescripts.com/forum/thread373996.html

    (I've never used it for setting the proxy details so don't know if this is correct)

    vb Code:
    1. Dim WbReq As New Net.WebClient
    2. WbReq.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials
    3. WbReq.DownloadFile(New Uri("Source/File.txt"), "C:\Temp\newFile.txt")

    The link I posted to, the guy did this instead of using the .Credentials line I posted above:

    vb Code:
    1. Dim proxyObj As New System.Net.WebProxy("Proxy server address & Port Num", True)
    2. WbReq.Proxy = proxyObj

    Don't ask me anything about the proxy stuff - I haven't a clue! Hope it helps. You might have to go do a little bit of research but shouldn't be too bad.
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width