Solved

Login failure: unknown username or bad password

Posted on 2010-11-19
7
999 Views
Last Modified: 2012-06-27
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
Comment
Question by:ross13
  • 3
  • 2
  • 2
7 Comments
 
LVL 3

Accepted Solution

by:
Pratik Parmar earned 500 total points
ID: 34172809
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
 

Author Comment

by:ross13
ID: 34175430
Thanks for that. The schedule task is ok. Its the vb.net application that has the issue and reports the error.
0
 
LVL 3

Expert Comment

by:Pratik Parmar
ID: 34178831
So It seems that your Bug was with your application, then kindly give feedback to me.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34179618
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
 

Author Comment

by:ross13
ID: 34183494
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
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34183612
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
 

Author Comment

by:ross13
ID: 34375443
The pc is not on the domain. I have asked the guy from hp to have a look.
0

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Set value of dynamically created checkboxlist 2 44
Store results in vb.net 3 25
How do sunrise and sunset times change with altitude 14 38
Visual studio 2015 1 22
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question