Click here to Skip to main content
15,919,422 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
System.Diagnostics.Process command = new System.Diagnostics.Process();
command.StartInfo.UserName ="Raushan";
command.StartInfo.Domain ="Raushan-PC";
System.Security.SecureString pwd = new System.Security.SecureString();
command.StartInfo.Password = pwd; 
command.StartInfo.Verb ="osmo@raushan";


try
{
    CreateFolder();
}

catch (Win32Exception e11)
{
    MessageBox.Show(e11.Message);
}

command.Close();

i am using this but its given error "Login Failure Unknown Username and Bad password "
but i am uisng correct password, please help me,,,,,,,,
Posted
v2

You sent a blank password and you don't even need the .Verb line.

The password is blank because you created it, did NOT put any data into it, and then passed it to the StartInfo.Password property.
 
Share this answer
 
If the new process will run under the same username as the current logged in user, you do not have to specify a username and password in the StartInfo object.

Also, use of the verb property isn't correct. See ProcessStartInfo.Verb Property [^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900