Site: http://menet.name/blog/christophe/Default.aspx Link: http://menet.name/blog/christophe/Rss.aspx
by Christophe via Christophe on 3/1/2009 6:47:58 PM
I had to install a Windows service on several servers this week (about 30 servers …). I wanted to do it using a simple batch file, and installing the service silently. Unfortunately, when using InstallUtil to install a Windows service, you can’t specify the credentials used by the service to logon. You can’t install your service with this kind of command line: InstallUtil.exe MyService.exe /username=MyUserName /password=Password I found a workaround using the OnBeforeInstall method of the Ins ...
[ read more ]
by Christophe via Christophe on 8/21/2008 6:03:05 PM
Sometimes, when working on your application, an exception is raised, and you don't necessary have a try ... catch block to handle this exception, or even to see it! When you are in the debug mode, just launch a "quick watch" and type "$exception". Could be useful! ...
by Christophe via Christophe on 5/11/2008 6:17:34 PM
I had to take over a project last week, an ASP.NET application. I found a lot of mistakes regarding resources protection and the use of try/catch/finally block. For instance, I found that: SqlConnection con = new SqlConnection()try{ con.Open(); // Some code here}catch (Exception ex){ throw ex;}finally{ if (con != null) con.close();} During a normal processing, if the code inside the try block works, everything is fine. No problem. Now, imagine: 1- // Some code here raises an exception ...
The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.