Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. download file from server error

download file from server error

Scheduled Pinned Locked Moved Visual Basic
sysadmincsharphelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anoop Brijmohun
    wrote on last edited by
    #1

    hi guys i am trying to download a file from the server by suplying the correct credentials but am getting a bad username or password error. the command i am using is

    My.Computer.Network.DownloadFile(My.Settings.ServerFile, My.Settings.LocalFile, "username", "password", True, 1000, True)

    the username and password supplied is correct. when i click on start-> run the ip address of the server, it pops up a username and password box. i enter in the exact same credentials and it goes through. what could be wrong or is there a better way of getting the file from the server onto a local pc thanks anoop

    D 1 Reply Last reply
    0
    • A Anoop Brijmohun

      hi guys i am trying to download a file from the server by suplying the correct credentials but am getting a bad username or password error. the command i am using is

      My.Computer.Network.DownloadFile(My.Settings.ServerFile, My.Settings.LocalFile, "username", "password", True, 1000, True)

      the username and password supplied is correct. when i click on start-> run the ip address of the server, it pops up a username and password box. i enter in the exact same credentials and it goes through. what could be wrong or is there a better way of getting the file from the server onto a local pc thanks anoop

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      I'm assuming you're talking about grabbing the file from a Windows server. Try prefixing the domain to the username, "domainName\userName".

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      A 1 Reply Last reply
      0
      • D Dave Kreskowiak

        I'm assuming you're talking about grabbing the file from a Windows server. Try prefixing the domain to the username, "domainName\userName".

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008

        A Offline
        A Offline
        Anoop Brijmohun
        wrote on last edited by
        #3

        Hi, thanks for your help, i have tried that but still same outcome. is there perhaps another way of doing this i.e. coying a file from the server and providing username and password? thanks

        D 1 Reply Last reply
        0
        • A Anoop Brijmohun

          Hi, thanks for your help, i have tried that but still same outcome. is there perhaps another way of doing this i.e. coying a file from the server and providing username and password? thanks

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Uhh...you already are doing this. You've got the correct method, the trick is to use the correct "domain\username" and "password". If you're downloading a file from a Windows server or workstation, you need to understand how Windows networking works. If the server is in a domain environment, you need to use an account that the domain recognizes. If the server and workstation that you're code is running on are in different domains, then you need to specify the domain that the server will recognize, usually the same domain the server is in. Now, there's a catch. If you're logging the workstation in under one account and making connections to the server, you cannot use a seperate account to download the file form the same server. If the server is in a workgroup environment, then you may have to specify the name of the server as the domain part of the username.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups