Click here to Skip to main content
15,913,027 members
Home / Discussions / C#
   

C#

 
AnswerRe: interupting the loop with the button Pin
Stefan Troschuetz3-Aug-06 5:21
Stefan Troschuetz3-Aug-06 5:21 
GeneralRe: interupting the loop with the button Pin
Blubbo3-Aug-06 5:26
Blubbo3-Aug-06 5:26 
AnswerRe: interupting the loop with the button Pin
Nader Elshehabi3-Aug-06 5:31
Nader Elshehabi3-Aug-06 5:31 
QuestionAsynchronous socket question Pin
Madmaximus3-Aug-06 4:39
Madmaximus3-Aug-06 4:39 
AnswerRe: Asynchronous socket question Pin
Tim Kohler3-Aug-06 5:56
Tim Kohler3-Aug-06 5:56 
GeneralPrefix Pin
Ennis Ray Lynch, Jr.3-Aug-06 5:59
Ennis Ray Lynch, Jr.3-Aug-06 5:59 
AnswerRe: Asynchronous socket question Pin
RizwanSharp3-Aug-06 6:11
RizwanSharp3-Aug-06 6:11 
QuestionImpersonation + Process.Start Pin
Gonzalo Brusella3-Aug-06 4:12
Gonzalo Brusella3-Aug-06 4:12 
I have to run several secuential proceses, some of them impersonated from the main identity of the program.

Using .Net 2.0, the a "ProcessStartInfo" instance, can impersonate, but the password must be a "SecureString".

I have the Username and the Password on a encrypted file, but when I decrypt the tye file, password this make is readable (wich we all know is bad thing).

The constructor of "SecureString", does not take a String as parameter, so I mahe this (check the sample):
System.Diagnostics.ProcessStartInfo _ps = new System.Diagnostics.ProcessStartInfo();

_ps.FileName = _command;
_ps.CreateNoWindow = false;
_ps.Arguments = _arguments;
_ps.UseShellExecute = false;

//Load the SecureString (This can be worst way)
SecureString _psw = new SecureString();

string _password = "123456";
foreach (char Character in _password.ToCharArray())
{
    _psw.AppendChar(Character);
}

_psw.MakeReadOnly();

_ps.LoadUserProfile = false;
_ps.UserName = "User";
_ps.Password = _psw;

System.Diagnostics.Process _process = new System.Diagnostics.Process();
_process.Start(_ps);
_process.WaitForExit();
Now There is way to solve the clear-password-in-memory problem?

The user account is a restricted account, but with access to some processes wich we don't want to be publicaly accessed.

I'm on a Fuzzy State: Between 0 an 1

AnswerRe: Impersonation + Process.Start Pin
Judah Gabriel Himango3-Aug-06 6:25
sponsorJudah Gabriel Himango3-Aug-06 6:25 
GeneralRe: Impersonation + Process.Start Pin
Judah Gabriel Himango3-Aug-06 6:37
sponsorJudah Gabriel Himango3-Aug-06 6:37 
GeneralRe: Impersonation + Process.Start Pin
Gonzalo Brusella3-Aug-06 7:05
Gonzalo Brusella3-Aug-06 7:05 
QuestionCombobox problem Pin
ZeinaBaG3-Aug-06 3:37
ZeinaBaG3-Aug-06 3:37 
AnswerRe: Combobox problem Pin
stancrm3-Aug-06 3:44
stancrm3-Aug-06 3:44 
Questionspeed up application Pin
V.3-Aug-06 3:19
professionalV.3-Aug-06 3:19 
AnswerRe: speed up application Pin
yueue3-Aug-06 3:27
yueue3-Aug-06 3:27 
GeneralRe: speed up application Pin
V.3-Aug-06 3:33
professionalV.3-Aug-06 3:33 
AnswerRe: speed up application Pin
WillemM3-Aug-06 3:29
WillemM3-Aug-06 3:29 
GeneralRe: speed up application Pin
V.3-Aug-06 3:33
professionalV.3-Aug-06 3:33 
GeneralRe: speed up application Pin
V.3-Aug-06 4:09
professionalV.3-Aug-06 4:09 
GeneralRe: speed up application Pin
Dave Kreskowiak3-Aug-06 5:31
mveDave Kreskowiak3-Aug-06 5:31 
GeneralRe: speed up application Pin
V.3-Aug-06 6:52
professionalV.3-Aug-06 6:52 
QuestionRe: speed up application Pin
RizwanSharp3-Aug-06 20:02
RizwanSharp3-Aug-06 20:02 
AnswerRe: speed up application Pin
Dave Kreskowiak4-Aug-06 2:02
mveDave Kreskowiak4-Aug-06 2:02 
QuestionRe: speed up application Pin
RizwanSharp4-Aug-06 2:34
RizwanSharp4-Aug-06 2:34 
AnswerRe: speed up application Pin
Dave Kreskowiak4-Aug-06 2:49
mveDave Kreskowiak4-Aug-06 2:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.