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
ross13Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Pratik ParmarConnect With a Mentor Commented:
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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
All Courses

From novice to tech pro — start learning today.