Solved

Login failure: unknown username or bad password

Posted on 2010-11-19
7
993 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now