Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

c# - How can I run IE with different users and specify a url? -


i'm trying create console application replace batch file. batch file prompted user , ran following code...

runas /user:usa\%usr% "c:\program files\internet explorer\iexplore.exe %serverpath%/%appname%"

how can translate c# code? i'm using code below. declare user name , path, launches ie windows login. using verb incorrectly? need include password, , if so, how?

string spath = serverpath processstartinfo startinfo = new processstartinfo(@"c:\program files\internet explorer\iexplore.exe"); startinfo.verb = @"runas /user:usa\" + suser; startinfo.arguments = spath; startinfo.useshellexecute = false; process.start(startinfo); 

function securestring makesecurestring(string text) {   securestring secure = new securestring();   foreach (char c in text)   {     secure.appendchar(c);   }    return secure; }  function void runas(string path, string username, string password) {   processstartinfo myprocess = new processstartinfo(path);   myprocess.username = username;   myprocess.password = makesecurestring(password);   myprocess.useshellexecute = false;   process.start(myprocess); }  runas(application, username, password); 

props fraser chapman's blog


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -