<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8669468133173109734</id><updated>2012-01-21T16:34:35.996-07:00</updated><category term='C#'/><category term='ASP'/><category term='Computers'/><category term='Internet'/><category term='Technology'/><category term='Programming'/><title type='text'>The Mono Loco</title><subtitle type='html'>A place for programming &amp; computer information, but lets not forget the random rants and raves..</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://monoloc.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://monoloc.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>pike</name><uri>http://www.blogger.com/profile/14103051801216575377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_iiE4SplaqIA/SHu8q0M_19I/AAAAAAAAABo/ui4WytSazzE/S220/100_0061.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8669468133173109734.post-65459900181165530</id><published>2009-10-06T21:55:00.007-07:00</published><updated>2009-10-07T08:53:29.697-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>ASP Grid View Focus on Text Box in Edit Mode</title><content type='html'>&lt;p&gt;&lt;span style="color:#fbf5e6;"&gt;&lt;/span&gt;I've seen a bunch of examples of how to focus in on a GridView's textbox while in edit mode but every one I saw involved a bunch of code &amp;amp; an item template.&lt;br /&gt;&lt;br /&gt;The basic idea I came up with was to acomplish the same thing through javascript. This process takes a little bit of manual work to find out the name of the control that you want.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;1st:&lt;/u&gt;&lt;/strong&gt; I added a method for the RowDataBound event so the text box I wanted actually existed when I was looking for it's ID.&lt;br /&gt;&lt;div style="BORDER-RIGHT: thin solid; BORDER-TOP: thin solid; BACKGROUND: rgb(251,245,230); BORDER-LEFT: thin solid; BORDER-BOTTOM: thin solid; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initialfont-size:12px;" &gt;&lt;span style="color:#000099;"&gt;protected void&lt;/span&gt; GridView_RowDataBound(&lt;span style="color:#3366ff;"&gt;object&lt;/span&gt; sender, &lt;span style="color:#33ccff;"&gt;GridViewRowEventArgs&lt;/span&gt; e)&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;2nd:&lt;/u&gt;&lt;/strong&gt; I had 12 columns in my grid view and I wanted to focus in on the last column's text box so I used the 11th control in the row to get the generated name of the control i needed. &lt;div style="BORDER-RIGHT: thin solid; BORDER-TOP: thin solid; BACKGROUND: rgb(251,245,230); BORDER-LEFT: thin solid; BORDER-BOTTOM: thin solid; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initialfont-size:12px;" &gt;&lt;span style="color:#000099;"&gt;string&lt;/span&gt; controlID = e.Row.Controls[11].ClientID;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;3rd:&lt;/u&gt;&lt;/strong&gt; I then had to replace the last two characters in the string with 00. (I'm not sure if this will change for you, thats what makes it a manual process for the first time. After the page loaded, I just did a view source on the HTML to see what changed in the name of the button object.)&lt;br /&gt;&lt;div style="BORDER-RIGHT: thin solid; BORDER-TOP: thin solid; BACKGROUND: rgb(251,245,230); BORDER-LEFT: thin solid; BORDER-BOTTOM: thin solid; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initialfont-size:12px;" &gt;controlID = controlID.Substring(0, controlID.Length - 2) + &lt;span style="color:#ff0000;"&gt;"00"&lt;/span&gt;;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;4th:&lt;/u&gt;&lt;/strong&gt; replace the underscore's with dollar signs. &lt;div style="BORDER-RIGHT: thin solid; BORDER-TOP: thin solid; BACKGROUND: rgb(251,245,230); BORDER-LEFT: thin solid; BORDER-BOTTOM: thin solid; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initialfont-size:12px;" &gt;controlID = controlID.Replace(&lt;span style="color:#ff0000;"&gt;'_'&lt;/span&gt;, &lt;span style="color:#ff0000;"&gt;'$'&lt;/span&gt;);&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;LAST:&lt;/u&gt;&lt;/strong&gt; Put the following javascript in a label or in the innerHtml of a panel.&lt;br /&gt;&lt;div style="BORDER-RIGHT: thin solid; BORDER-TOP: thin solid; BACKGROUND: rgb(251,245,230); BORDER-LEFT: thin solid; BORDER-BOTTOM: thin solid; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initialfont-size:12px;" &gt;lblJavaScriptPOST.Text = &lt;span style="color:#ff0000;"&gt;"&amp;ltscript type="text\javascript"&amp;gtdocument.getElementById('"&lt;/span&gt; + controlID + &lt;span style="color:#ff0000;"&gt;"').focus()&amp;lt/script&amp;gt"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;So... here is all of the code for my gridview's row data bound event method.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div style="BORDER-RIGHT: thin solid; BORDER-TOP: thin solid; BACKGROUND: rgb(251,245,230); BORDER-LEFT: thin solid; BORDER-BOTTOM: thin solid; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initialfont-size:12px;" &gt;&lt;span style="color:#000099;"&gt;protected void&lt;/span&gt; GridView_RowDataBound(&lt;span style="color:#3366ff;"&gt;object&lt;/span&gt; sender, &lt;span style="color:#33ccff;"&gt;GridViewRowEventArgs&lt;/span&gt; e)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#33cc00;"&gt;//If this current row being bound is in the edit state, set focus to something&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000099;"&gt;if&lt;/span&gt; (e.Row.RowState == &lt;span style="color:#33ccff;"&gt;DataControlRowState&lt;/span&gt;.Edit &amp;#124;&amp;#124; (e.Row.RowState == (&lt;span style="color:#33ccff;"&gt;DataControlRowState&lt;/span&gt;.Edit &amp;#124;&lt;span style="color:#33ccff;"&gt;DataControlRowState&lt;/span&gt;.Alternate)))&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000099;"&gt;string&lt;/span&gt; controlID = e.Row.Controls[11].ClientID;&lt;br /&gt;controlID = controlID.Substring(0, controlID.Length - 2) + &lt;span style="color:#ff0000;"&gt;"00"&lt;/span&gt;;&lt;br /&gt;controlID = controlID.Replace(&lt;span style="color:#ff0000;"&gt;'_'&lt;/span&gt;, &lt;span style="color:#ff0000;"&gt;'$'&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;lblJavaScriptPOST.Text = &lt;span style="color:#ff0000;"&gt;"&amp;ltscript type="text\javascript"&amp;gtdocument.getElementById('"&lt;/span&gt; + controlID + &lt;span style="color:#ff0000;"&gt;"').focus()&amp;lt/script&amp;gt"&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;This is a lot less code than using a template item and if you don't/can't use template items. It's the only way that I know of doing this.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Hope this helps someone!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8669468133173109734-65459900181165530?l=monoloc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monoloc.blogspot.com/feeds/65459900181165530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8669468133173109734&amp;postID=65459900181165530' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/65459900181165530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/65459900181165530'/><link rel='alternate' type='text/html' href='http://monoloc.blogspot.com/2009/10/asp-grid-view-focus-on-text-box-in-edit.html' title='ASP Grid View Focus on Text Box in Edit Mode'/><author><name>pike</name><uri>http://www.blogger.com/profile/14103051801216575377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_iiE4SplaqIA/SHu8q0M_19I/AAAAAAAAABo/ui4WytSazzE/S220/100_0061.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8669468133173109734.post-2817414780119604283</id><published>2009-04-23T09:01:00.007-07:00</published><updated>2009-04-28T12:51:02.765-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><title type='text'>C#: Saving Application Settings During Runtime</title><content type='html'>Normally when you would try to save the application settings during runtime you get an error that the application settings are read only. This is a way that I found around that.&lt;br /&gt;&lt;br /&gt;Essentially, you have to remove and re-add the settings.&lt;br /&gt;&lt;br /&gt;I should also note that this only works in Visual Studio 2005 as I found out last night when i tried it in 2008.&lt;br /&gt;&lt;br /&gt;&lt;div style="border-style: solid; border-width: thin; background: rgb(251, 245, 230) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-size: 12px;"&gt;&lt;br /&gt;// Open App.Config of executable&lt;br /&gt;                System.Configuration.Configuration config =                 ConfigurationManager.OpenExeConfiguration&lt;br /&gt;(ConfigurationUserLevel.None);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                //SAVE ALL OF THE SETTINGS&lt;br /&gt;                config.AppSettings.Settings.Remove("sqlServer");&lt;br /&gt;                config.AppSettings.Settings.Add("sqlServer", this.txbServer.Text);&lt;br /&gt;&lt;br /&gt;                config.AppSettings.Settings.Remove("sqlDatabase");&lt;br /&gt;                config.AppSettings.Settings.Add("sqlDatabase", this.txbDatabase.Text);&lt;br /&gt;&lt;br /&gt;                config.AppSettings.Settings.Remove("sqlUserName");&lt;br /&gt;                config.AppSettings.Settings.Add("sqlUserName", this.txbUserName.Text);&lt;br /&gt;&lt;br /&gt;                config.AppSettings.Settings.Remove("sqlUserPassword");&lt;br /&gt;                config.AppSettings.Settings.Add("sqlUserPassword", this.txbPassword.Text);&lt;br /&gt;&lt;br /&gt;                config.AppSettings.Settings.Remove("sqlSecurity");&lt;br /&gt;                config.AppSettings.Settings.Add("sqlSecurity", this.txbSecurity.Text);&lt;br /&gt;&lt;br /&gt;                config.AppSettings.Settings.Remove("extListCollection");&lt;br /&gt;                config.AppSettings.Settings.Add("extListCollection", this.txbExCC.Text);&lt;br /&gt;&lt;br /&gt;                config.AppSettings.Settings.Remove("sumListCollection");&lt;br /&gt;                config.AppSettings.Settings.Add("sumListCollection", this.txbSumCC.Text);&lt;br /&gt;&lt;br /&gt;                config.AppSettings.Settings.Remove("indListCollection");&lt;br /&gt;                config.AppSettings.Settings.Add("indListCollection", this.txbIndAliasCC.Text);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                // Save the config file.&lt;br /&gt;                config.Save(ConfigurationSaveMode.Full);&lt;br /&gt;&lt;br /&gt;                // Force a reload of a changed section. &lt;br /&gt;                ConfigurationManager.RefreshSection("appSettings");&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8669468133173109734-2817414780119604283?l=monoloc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monoloc.blogspot.com/feeds/2817414780119604283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8669468133173109734&amp;postID=2817414780119604283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/2817414780119604283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/2817414780119604283'/><link rel='alternate' type='text/html' href='http://monoloc.blogspot.com/2009/04/c-saving-application-settings-during.html' title='C#: Saving Application Settings During Runtime'/><author><name>pike</name><uri>http://www.blogger.com/profile/14103051801216575377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_iiE4SplaqIA/SHu8q0M_19I/AAAAAAAAABo/ui4WytSazzE/S220/100_0061.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8669468133173109734.post-2847255964074591666</id><published>2008-07-14T12:43:00.004-07:00</published><updated>2008-07-14T13:50:20.184-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computers'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><title type='text'>Remotely start applications with WMI &amp; bypass Code Access Security</title><content type='html'>This article assumes that the reader has an understanding of how to make queries to WMI, has administrative rights on the remote machine &amp;amp; can create a windows service. I am not going to contain any code but I will try to include links to sites that can provide help.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Reasoning &lt;span style="font-size:78%;"&gt;(the story)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;I needed to install a network monitoring agent on all of our servers. To do this I was using WMI to start a .exe that started and monitored the installation. My application had to check environment variables. Which then caused it to fail because of &lt;a href="http://msdn.microsoft.com/en-us/library/930b76w0%28VS.80%29.aspx"&gt;Code Access Security&lt;/a&gt;, even though I had full administrative rights. You can change the systems security policy to allows your program to run if you are allowed, but I figured that it would be more work to get all of the security settings changed. So I came up with a new plan to install a windows service through the &lt;a href="http://search.msdn.microsoft.com/Default.aspx?query=win32_service&amp;amp;brand=msdn&amp;amp;locale=en-us&amp;amp;refinement="&gt;Win32_Service&lt;/a&gt; Namespace in WMI. So I change the application to a sindows service and it could read the environment variables just fine. Then I removed the windows service through the same WMI Namespace. (I plan on making it a client/server where the server installs,  monitors, and uninstalls the client.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Steps &lt;span style="font-size:78%;"&gt;(super simplified)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Write a windows service.&lt;/span&gt; (don't forget the installer)&lt;br /&gt;Use this service to install applications, or start executables. Also, if you leave this on the remote machine for any period of time you greatley consider the security of it. &lt;a href="http://msdn.microsoft.com/en-us/library/aa984464%28VS.71%29.aspx"&gt;&lt;br /&gt;&lt;/a&gt;&lt;ul&gt;&lt;li&gt;Creatinga  windows service:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa984464%28VS.71%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa984464(VS.71).aspx&lt;/a&gt;&lt;/li&gt;&lt;li&gt;The Installer:&lt;a href="http://www.montgomerysoftware.com/CreatingWindowsServiceInCSharp.aspx"&gt;&lt;br /&gt;http://www.montgomerysoftware.com/CreatingWindowsServiceInCSharp.aspx&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;Remotley install/remove the service.&lt;/span&gt;&lt;/span&gt; (I choose WMI)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;WMI Win32_Service Class:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa394418%28VS.85%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa394418(VS.85).aspx&lt;/a&gt;&lt;/li&gt;&lt;li&gt;WMI Win32_Service.Create() method:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa389390.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa389390.aspx&lt;/a&gt;&lt;/li&gt;&lt;li&gt;How to execute a WMI method:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms257364%28VS.80%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms257364(VS.80).aspx&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Thats about it, after your service starts on the machine it can do just about anything it wants, read system variables, start other applications, install programs...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks for reading, please leave a comment to let everyone know how this helped you out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8669468133173109734-2847255964074591666?l=monoloc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monoloc.blogspot.com/feeds/2847255964074591666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8669468133173109734&amp;postID=2847255964074591666' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/2847255964074591666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/2847255964074591666'/><link rel='alternate' type='text/html' href='http://monoloc.blogspot.com/2008/07/remotely-start-applications-with-wmi.html' title='Remotely start applications with WMI &amp; bypass Code Access Security'/><author><name>pike</name><uri>http://www.blogger.com/profile/14103051801216575377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_iiE4SplaqIA/SHu8q0M_19I/AAAAAAAAABo/ui4WytSazzE/S220/100_0061.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8669468133173109734.post-6053328795234379865</id><published>2008-06-19T22:06:00.011-07:00</published><updated>2008-07-14T13:50:45.411-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computers'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><title type='text'>Remotely Debug a Running Process with Visual Studio .Net.</title><content type='html'>Here goes my attempt to explain the process of remotely debugging any application written with C#, VB/Visual Basic or C++. In order to do this, all you will need is Visual Studio .Net Pro &amp;amp; an application with source code available to debug. (VS.Net 2008 Express will do c++ but you still need pro for C# or VB...)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Microsoft's Remote Debugging Monitor&lt;/span&gt;&lt;br /&gt;The Remote Debugging Monitor is  basically a server that Visual Studio connects to for, well, remotely debugging code... &lt;span style="font-size:85%;"&gt;&lt;span style="font-size:100%;"&gt;This will&lt;/span&gt; need to be running on the remote machine that the process&lt;/span&gt; you want to debug is on.&lt;br /&gt;&lt;br /&gt;If you have Visual Studio installed on the remote machine. You can start the Remote Debugging Monitor from the start menu by going to: Microsoft Visual Studio -&gt; Visual Studio Tools -&gt; Visual Studio Remote Debugger.&lt;br /&gt;&lt;br /&gt;Otherwise, you can copy the needed files to the remote machine &amp;amp; start it over there.&lt;br /&gt;The files you will need are located in the Visual Studio file in the "Common\IDE\Remote Debugger" file.&lt;br /&gt;So copy these files over to the remote machine and start msvmon.exe.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;mcee.dll&lt;/li&gt;&lt;li&gt;msvb7.dll&lt;/li&gt;&lt;li&gt;msvsmon.exe&lt;/li&gt;&lt;li&gt;msvsmon.exe.config&lt;/li&gt;&lt;li&gt;symsrv.dll&lt;/li&gt;&lt;li&gt;vjscompee.dll&lt;/li&gt;&lt;/ul&gt;In order to connect to the Remote Debugging Monitor you will need to be an administrator on the remote machine &amp;amp; both firewalls will need to be turned off.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Getting your project Ready&lt;/span&gt;&lt;br /&gt;Now open your project with Visual Studio &amp;amp; put all of your breakpoints in. If you need some time to allow you to  connect before a break point will be hit, put in a sleep. I gave myself 25 seconds. (System.Threading.Thread.Sleep(25000);)&lt;br /&gt;&lt;br /&gt;It doesn't matter how you start your program on the remote machine but it does matter that your .pdb file is in the same location as the .exe when it's run. The .pdb file contains the information about the code in relation to the breakpoints. So copy your projects .pdb file to the same location of your .exe. It can be found in the projects folder under:\bin\Debug.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Attaching Visual Studio to the remote process&lt;/span&gt;&lt;br /&gt;Go to the machine you have Visual Studio running on &amp;amp; go to "Debug -&gt; Attach to Process..." on the task bar. Make sure the Qualifier is the name of the remote computer you are attaching to and that you can connect &amp;amp; view the running processes. If you have problems check out: &lt;a href="http://support.microsoft.com/kb/910448"&gt;http://support.microsoft.com/kb/910448&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now start the process on the remote machine, click on it in the Attach to Process window, and click Attach. As soon as the process hits a Break Point, assuming you left yourself enough time to attach before the break. All of the code should appear in your debugger and you'll be able to step through &amp;amp; debug as normal.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Reasoning&lt;br /&gt;&lt;/span&gt;I was writing an application using WMI to remotely install an enterprise network capture agent on several hundred servers. I ran into a problem where certain operations or lines of code, didn't have enough security privileges. What I found out is that even if you are an admin on the machine, depending on where your code starts &amp;amp; how it is started, each line is subject to Code Access Security. There are ways around this, (another article to come...) but it turns out that my app was failing because I was trying to gain access to an environment variable. Being able to remotely debug this process made it much easier to find out my error.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks for reading and please leave a comment to let everyone know how this helped you out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8669468133173109734-6053328795234379865?l=monoloc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monoloc.blogspot.com/feeds/6053328795234379865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8669468133173109734&amp;postID=6053328795234379865' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/6053328795234379865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/6053328795234379865'/><link rel='alternate' type='text/html' href='http://monoloc.blogspot.com/2008/06/remotely-debug-running-process-with-net.html' title='Remotely Debug a Running Process with Visual Studio .Net.'/><author><name>pike</name><uri>http://www.blogger.com/profile/14103051801216575377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_iiE4SplaqIA/SHu8q0M_19I/AAAAAAAAABo/ui4WytSazzE/S220/100_0061.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8669468133173109734.post-405498266426164691</id><published>2008-06-19T00:05:00.009-07:00</published><updated>2008-07-14T13:51:05.066-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computers'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><title type='text'>Debugging VBScripts with Visual Studio .NET</title><content type='html'>&lt;span style="font-size:130%;"&gt;How to debug a .vbs or .js file with Visual Studio .Net or Microsoft Script Debugger.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;First off, your going to need a debugger... I prefer &lt;a href="http://www.microsoft.com/express/"&gt;Visual Studio .NET&lt;/a&gt; but you can also use the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=2f465be0-94fd-4569-b3c4-dffdf19ccd99&amp;amp;displaylang=en"&gt;MS Script Debugger&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;First, you'll need a script to debug, so stick this code in notepad &amp;amp; save it to "c:\foo.vbs". Unless you already have your own of course.&lt;br /&gt;&lt;br /&gt;&lt;div style="border-style: solid; border-width: thin; background: rgb(251, 245, 230) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-size: 12px;"&gt;'c:\foo.vbs&lt;br /&gt;WScript.Echo "To Debut: Run -&gt; cscript //d c:\foo.vbs"&lt;br /&gt;WScript.Echo&lt;br /&gt;&lt;br /&gt;num1 = 5&lt;br /&gt;num2 = 13&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;'Here's your break point which will send this to the debugger.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;STOP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;WScript.Echo "num1: " &amp;amp; num1&lt;br /&gt;WScript.Echo "num2: " &amp;amp; num2&lt;br /&gt;WScript.Echo "num1 + num2: " &amp;amp; num1 + num2&lt;br /&gt;&lt;br /&gt;WScript.Echo&lt;br /&gt;Set oShell = CreateObject( "WScript.Shell" )&lt;br /&gt;user=oShell.ExpandEnvironmentStrings("%UserName%")&lt;br /&gt;comp=oShell.ExpandEnvironmentStrings("%ComputerName%")&lt;br /&gt;WScript.Echo comp &amp;amp; "\" &amp;amp; user[/code]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now you can start debugging the .vbs or.js file from Start -&gt; Run or the Command Prompt.&lt;br /&gt;&lt;br /&gt;Type:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cscript //d c:\foo.vbs&lt;/span&gt; (To use STOP as a breakpoint)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cscript //x c:\foo.vbs&lt;/span&gt; (To starting debugging immediately)&lt;br /&gt;&lt;br /&gt;As soon as the Windows Script Host hits the STOP that is located after the first few lines, Windows will prompt you to select a debugger. Alternately, you can stick a //x to start the debugger at the start.&lt;br /&gt;&lt;br /&gt;I just want to say how happy I was when I found this because manually debugging scripts was a really big PITA. If you have any problems, check out &lt;a href="http://support.microsoft.com/kb/308364"&gt;Microsoft's KB article #308364&lt;/a&gt; because it just may help...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks for reading and please leave a comment to let everyone know how this helped you out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8669468133173109734-405498266426164691?l=monoloc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monoloc.blogspot.com/feeds/405498266426164691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8669468133173109734&amp;postID=405498266426164691' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/405498266426164691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/405498266426164691'/><link rel='alternate' type='text/html' href='http://monoloc.blogspot.com/2008/06/debugging-vbscripts-with-net.html' title='Debugging VBScripts with Visual Studio .NET'/><author><name>pike</name><uri>http://www.blogger.com/profile/14103051801216575377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_iiE4SplaqIA/SHu8q0M_19I/AAAAAAAAABo/ui4WytSazzE/S220/100_0061.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8669468133173109734.post-7153965326160398647</id><published>2007-05-11T08:46:00.000-07:00</published><updated>2007-05-11T09:05:18.648-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computers'/><title type='text'>Setting a Priority to Your Processes</title><content type='html'>&lt;!--– google_ad_section_start –--&gt;If you have a process, application or program that is resource intensive and you would like it to run faster. Windows will allow you to set the priority of that process. By default, the majority of the common windows applications are set to Normal. If you compose an application that sorts through huge amounts of data, takes up tons of memory, is very processor oriented, or you would just like it to run faster. You may want to give it higher priority among the other processes.&lt;br /&gt;&lt;br /&gt;Programs with higher priority will always win the fight for the processor. As soon as a program with high priority gets done using some resource and needs the processor again, it will get it. You can think of a high priority process as the fast pass at Disney Land, instead of waiting in line for "hours" you get to jump right onto the ride.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Setting a processes' priority:&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;Hit Ctrl+Alt+Delete (To go to your Task Manager)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Select the Processes tab at the top&lt;/li&gt;&lt;li&gt;Locate &amp;amp; right click on the desired running process&lt;/li&gt;&lt;li&gt;Set Priority&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;This will permanently change this processes priority.&lt;!--– google_ad_section_end –--&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8669468133173109734-7153965326160398647?l=monoloc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monoloc.blogspot.com/feeds/7153965326160398647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8669468133173109734&amp;postID=7153965326160398647' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/7153965326160398647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/7153965326160398647'/><link rel='alternate' type='text/html' href='http://monoloc.blogspot.com/2007/05/setting-priority-to-your-processes.html' title='Setting a Priority to Your Processes'/><author><name>pike</name><uri>http://www.blogger.com/profile/14103051801216575377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_iiE4SplaqIA/SHu8q0M_19I/AAAAAAAAABo/ui4WytSazzE/S220/100_0061.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8669468133173109734.post-5802121753732419611</id><published>2007-05-08T19:36:00.000-07:00</published><updated>2007-05-08T21:11:40.347-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Internet'/><title type='text'>Irrelevant Google AdSense Ads</title><content type='html'>&lt;!--– google_ad_section_start –--&gt;&lt;br /&gt;Over the past few months I have noticed that some of the ads I have been receiving on this blog and my web page &lt;a href="http://www.monoloc.net"&gt;http://www.monoloc.net&lt;/a&gt; are completely irrelevant to my content. Up until recently I didn't care enough about it to research what was happening; until I had the same ad come up for about a week.&lt;br /&gt;&lt;span style="font-size:78%;"&gt;Irrelevant Advertisement&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_iiE4SplaqIA/RkE4JE138RI/AAAAAAAAAAc/Qv9Cs0aGh08/s1600-h/googleAdds.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_iiE4SplaqIA/RkE4JE138RI/AAAAAAAAAAc/Qv9Cs0aGh08/s320/googleAdds.JPG" alt="" id="BLOGGER_PHOTO_ID_5062389184710832402" border="0" /&gt;&lt;/a&gt; All of my pages were receiving these ads and I couldn't figure out what     content I had that brought them. After a while I figured out that the people behind these Adwords are using "Are", "Am"... and other all-encompassing words that would be everywhere. I don't see how this is an effective use of the Google Adwords program since it does not target anything.&lt;br /&gt;&lt;br /&gt;After some research I found &lt;a href="http://kylescove.com/2007/04/17/getting-the-most-relevant-ads-with-google-adsense/"&gt;&lt;span style="text-decoration: underline;"&gt;http://kylescove.com&lt;/span&gt;&lt;/a&gt; that explained how to ban ads. It also explained how to direct the AdSense bot directly to the content you would like it to search for keywords.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Blocking an Ad:&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;Access your Google AdSense account&lt;/li&gt;&lt;li&gt;Click the AdSense Setup tab at the top&lt;/li&gt;&lt;li&gt;Select the &lt;span class="activeText"&gt;Competitive Ad Filter section of this tab&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="activeText"&gt;Enter the ad's url in the textarea&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold;"&gt;Targeting your content:&lt;/span&gt;&lt;br /&gt;This is done by inserting comments into the HTML of your page.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Start &lt;/span&gt;of targeted area:&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&amp;lt!--– google_ad_section_start –--&amp;gt&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;End &lt;/span&gt;of targeted area:&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&amp;lt!--– google_ad_section_end –--&amp;gt&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Start &lt;/span&gt;of &lt;span style="font-weight: bold;"&gt;un-&lt;/span&gt;targeted area:&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&amp;lt!--– google_ad_section_start(weight=ignore) –--&amp;gt&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;Now that I have this information I should no longer be receiving irrelevant advertisements as well as hopefully increasing my revenue.&lt;br /&gt;&lt;!--– google_ad_section_end –--&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8669468133173109734-5802121753732419611?l=monoloc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monoloc.blogspot.com/feeds/5802121753732419611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8669468133173109734&amp;postID=5802121753732419611' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/5802121753732419611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/5802121753732419611'/><link rel='alternate' type='text/html' href='http://monoloc.blogspot.com/2007/05/irrelevant-google-adsense-ads.html' title='Irrelevant Google AdSense Ads'/><author><name>pike</name><uri>http://www.blogger.com/profile/14103051801216575377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_iiE4SplaqIA/SHu8q0M_19I/AAAAAAAAABo/ui4WytSazzE/S220/100_0061.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_iiE4SplaqIA/RkE4JE138RI/AAAAAAAAAAc/Qv9Cs0aGh08/s72-c/googleAdds.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8669468133173109734.post-5000371796793016882</id><published>2007-04-28T20:11:00.000-07:00</published><updated>2007-05-08T21:02:03.015-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technology'/><title type='text'>Skip directly to the movie with out a remote on any DVD player.</title><content type='html'>&lt;!--– google_ad_section_start –--&gt;Quite a while ago I was trying to watch a DVD, and the only problem was, I couldn't find my remote. Everybody knows how difficult it is to navigate the DVD menus without a remote, especially when your DVD player doesn't have directional buttons directly on it. After a bit of tampering I found that the movie would play if I pressed stop-stop-play. Since then, the first thing I do after I put in any DVD is press stop-stop-play. This makes the DVD player skip directly to the movie, no previews, no menu. I have tried this on many different DVD players and it has worked on every single one of them.&lt;br /&gt;&lt;br /&gt;So remember, whether you want to skip the previews &amp; menu or especially if you have lost your remote. Put the DVD in, wait for something to come up on the screen, and press &lt;span style="font-weight: bold;"&gt;STOP-STOP-PLAY&lt;/span&gt;.&lt;!--– google_ad_section_end –--&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8669468133173109734-5000371796793016882?l=monoloc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monoloc.blogspot.com/feeds/5000371796793016882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8669468133173109734&amp;postID=5000371796793016882' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/5000371796793016882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8669468133173109734/posts/default/5000371796793016882'/><link rel='alternate' type='text/html' href='http://monoloc.blogspot.com/2007/04/skip-directly-to-movie-with-out-remote.html' title='Skip directly to the movie with out a remote on any DVD player.'/><author><name>pike</name><uri>http://www.blogger.com/profile/14103051801216575377</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_iiE4SplaqIA/SHu8q0M_19I/AAAAAAAAABo/ui4WytSazzE/S220/100_0061.jpg'/></author><thr:total>0</thr:total></entry></feed>
