Solved

Login failure: unknown username or bad password

Posted on 2010-11-19
7
988 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Vb.Net Menu 1 22
visual Basic Net vs c# net 8 54
regex to allow alphanumeric characters and \ 2 22
Round a string to two digits 12 24
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 …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

705 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

15 Experts available now in Live!

Get 1:1 Help Now