• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1017
  • Last Modified:

Login failure: unknown username or bad password

In my vb.net application I am trying to copy a file from one location to another and receive the following message:
Login failure: unknown username or bad password

The program works fine on my pc but I moved to run on the server under a scheduled task.

Cheers
0
ross13
Asked:
ross13
  • 3
  • 2
  • 2
1 Solution
 
Pratik ParmarCommented:
My Friend,

For File to Be Copied From PC A to PC B, By Using a Script Which is Scheduled as Task

The Network Sharing Should be ON,
Both PC Should Have Passwords, and The Destination's PC UserNetworkCredentials should either have cached on to your PC.(that means that you have atleast accessed a network share once, so it caches on to your pc),

Read This Article on Scheduled Task..

http://technet.microsoft.com/en-us/library/bb726974.aspx
0
 
ross13Author Commented:
Thanks for that. The schedule task is ok. Its the vb.net application that has the issue and reports the error.
0
 
Pratik ParmarCommented:
So It seems that your Bug was with your application, then kindly give feedback to me.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
CodeCruiserCommented:
This is obviously a permissions issue. What are the source and destination locations? Does the user under which the app runs, has permissions on both source and destination folders?
0
 
ross13Author Commented:
I am running the application under my name (administrator). I can copy the files between the servers ok.

I have been looking at some other links on google and can found some information regarding user impersonation. Do i need to do something like this?

http://support.microsoft.com/kb/842789
http://www.netframeworkdev.com/net-base-class-library/logon-failure-unknown-user-name-bad-password-8947.shtml

Cheers,
0
 
CodeCruiserCommented:
If the app is running under Administrator then no other impersonation is needed. But is that local administrator or domain administrator? And is the source and destination on same server or different servers?
0
 
ross13Author Commented:
The pc is not on the domain. I have asked the guy from hp to have a look.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now