<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>try outs with .Net</title>
	<atom:link href="http://inquest.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://inquest.wordpress.com</link>
	<description>struggling with c#, ASP.NET, IIS, XML ............</description>
	<lastBuildDate>Wed, 27 Jul 2011 08:37:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='inquest.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>try outs with .Net</title>
		<link>http://inquest.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://inquest.wordpress.com/osd.xml" title="try outs with .Net" />
	<atom:link rel='hub' href='http://inquest.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Problematic Modal Dialog in ASP.net</title>
		<link>http://inquest.wordpress.com/2010/08/19/problematic-modal-dialog-in-asp-net/</link>
		<comments>http://inquest.wordpress.com/2010/08/19/problematic-modal-dialog-in-asp-net/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 00:45:40 +0000</pubDate>
		<dc:creator>sandeep bharati</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://inquest.wordpress.com/?p=39</guid>
		<description><![CDATA[Once we tried using modal dialog window for editing records. Following javascript is used to open the edit page. window.showModalDialog( editPageUrl, &#8220;Update records&#8221;, &#8220;dialogWidth:350px;dialogHeight:300px&#8221;); This edit page was fetching records from database in its page_load event. We faced following issues. I&#62; When clicked on the submit button, the parent page opens in a new window: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=39&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Once we tried using modal dialog window for editing records. Following javascript is used to open the edit page.</p>
<p>window.showModalDialog( editPageUrl, &#8220;Update records&#8221;, &#8220;dialogWidth:350px;dialogHeight:300px&#8221;);</p>
<p>This edit page was fetching records from database in its page_load event. We faced following issues.</p>
<p>I&gt; When clicked on the submit button, the parent page opens in a new window:<br />
To resolve this just add &lt;base target=&#8221;_self&#8221;&gt;      in head part of modal window.</p>
<p>II&gt; After editing record using this modal window, if we try to open the edited record it displays the old values. This seems to because of caching. So just turn of the caching for the modal window page.  To do this add following lines before &lt;html&gt; tag of the aspx page. &lt;%@ OutputCache Location=&#8221;None&#8221; VaryByParam=&#8221;None&#8221; %&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/inquest.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/inquest.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/inquest.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/inquest.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/inquest.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/inquest.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/inquest.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/inquest.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/inquest.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/inquest.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/inquest.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/inquest.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/inquest.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/inquest.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=39&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-rating-enabled sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://inquest.wordpress.com/2010/08/19/problematic-modal-dialog-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b40a932f2e805ef0842a691578c08308?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">sandeep</media:title>
		</media:content>
	</item>
		<item>
		<title>WMI query to get files from a folder</title>
		<link>http://inquest.wordpress.com/2009/05/22/wmi-query-to-get-files-from-a-folder/</link>
		<comments>http://inquest.wordpress.com/2009/05/22/wmi-query-to-get-files-from-a-folder/#comments</comments>
		<pubDate>Fri, 22 May 2009 15:18:01 +0000</pubDate>
		<dc:creator>sandeep bharati</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WMI]]></category>

		<guid isPermaLink="false">http://inquest.wordpress.com/?p=24</guid>
		<description><![CDATA[just change following ObjectQuery part in code of WMI Process This query will get all dlls in c:\windows\system32 but not in subdirectories System.Management.ObjectQuery oQuery = new System.Management.ObjectQuery(&#8220;Select * from CIM_DataFile where Drive=&#8217;c:&#8217; and Path=&#8217;\\\\windows\\\\system32\\\\&#8217; and Extension=&#8217;dll&#8217;&#8221;); Note the number of  &#8216;\&#8217; in query variable Path otherwise you&#8217;ll get the error as: An unhandled exception of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=24&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>just change following ObjectQuery part in code of <a href="http://inquest.wordpress.com/2008/04/08/terminate-process-on-remote-machine-using-wmi">WMI Process </a></p>
<p>This query will get all dlls in c:\windows\system32 but not in subdirectories</p>
<div>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:'Courier New';">System.Management.<span style="color:teal;">ObjectQuery</span> oQuery = <span style="color:blue;">new</span><br />
System.Management.<span style="color:teal;">ObjectQuery</span>(<span style="color:maroon;">&#8220;Select<br />
* from CIM_DataFile where Drive=&#8217;c:&#8217; and Path=&#8217;\\\\windows\\\\system32\\\\&#8217; and<br />
Extension=&#8217;dll&#8217;&#8221;</span>);</span></p>
<p class="MsoNormal" style="margin:0;">
<p class="MsoNormal" style="margin:0;">
<p class="MsoNormal" style="margin:0;">Note the number of  &#8216;\&#8217; in query variable Path otherwise you&#8217;ll get the error as:</p>
<p>An unhandled exception of type &#8216;System.Management.ManagementException&#8217; occurred in System.Management.dll</p>
<p>Additional information: Invalid query</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/inquest.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/inquest.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/inquest.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/inquest.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/inquest.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/inquest.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/inquest.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/inquest.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/inquest.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/inquest.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/inquest.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/inquest.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/inquest.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/inquest.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=24&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-rating-enabled sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://inquest.wordpress.com/2009/05/22/wmi-query-to-get-files-from-a-folder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b40a932f2e805ef0842a691578c08308?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">sandeep</media:title>
		</media:content>
	</item>
		<item>
		<title>Executing dos command or external exe with arguments using c#</title>
		<link>http://inquest.wordpress.com/2009/05/12/executing-dos-command-or-external-exe-with-arguments-using-c/</link>
		<comments>http://inquest.wordpress.com/2009/05/12/executing-dos-command-or-external-exe-with-arguments-using-c/#comments</comments>
		<pubDate>Tue, 12 May 2009 12:30:13 +0000</pubDate>
		<dc:creator>sandeep bharati</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://inquest.wordpress.com/?p=16</guid>
		<description><![CDATA[Even though ProcessStartInfo has one more parameter for arguments it was not working but using following code it works fine. System.Diagnostics.ProcessStartInfo psinfo; System.Diagnostics.Process pro = new System.Diagnostics.Process (); psinfo = new System.Diagnostics.ProcessStartInfo(&#8220;cmd&#8221;,&#8220;/c chkdsk c: &#8220;); pro.StartInfo = psinfo; pro.Start ();<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=16&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<p>Even though <span style="color:teal;">ProcessStartInfo</span> has one more parameter for arguments it was not working but using following code it works fine.</p>
<p class="MsoNormal" style="margin:0;">
<p><span style="font-size:10pt;font-family:'Courier New';">System.Diagnostics.<span style="color:teal;">ProcessStartInfo</span> psinfo;</span></p>
<p><span style="font-size:10pt;font-family:'Courier New';">System.Diagnostics.<span style="color:teal;">Process</span> pro = <span style="color:blue;">new</span> System.Diagnostics.<span style="color:teal;">Process</span> ();</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:'Courier New';">psinfo = <span style="color:blue;">new</span> System.Diagnostics.<span style="color:teal;">ProcessStartInfo</span>(<span style="color:maroon;">&#8220;cmd&#8221;</span>,<span style="color:maroon;">&#8220;/c chkdsk c: &#8220;</span>);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:'Courier New';"><span> </span><br />
</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:'Courier New';">pro.StartInfo = psinfo;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:'Courier New';">pro.Start ();</span></p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/inquest.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/inquest.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/inquest.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/inquest.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/inquest.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/inquest.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/inquest.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/inquest.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/inquest.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/inquest.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/inquest.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/inquest.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/inquest.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/inquest.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=16&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-rating-enabled sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://inquest.wordpress.com/2009/05/12/executing-dos-command-or-external-exe-with-arguments-using-c/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b40a932f2e805ef0842a691578c08308?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">sandeep</media:title>
		</media:content>
	</item>
		<item>
		<title>Reflection: Create dynamic instance and invoke methods runtime</title>
		<link>http://inquest.wordpress.com/2008/05/16/reflection-create-dynamic-types-and-execute-methods-runtime/</link>
		<comments>http://inquest.wordpress.com/2008/05/16/reflection-create-dynamic-types-and-execute-methods-runtime/#comments</comments>
		<pubDate>Fri, 16 May 2008 07:06:06 +0000</pubDate>
		<dc:creator>sandeep bharati</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[dynamic instance]]></category>
		<category><![CDATA[on the fly]]></category>
		<category><![CDATA[reflection]]></category>

		<guid isPermaLink="false">http://inquest.wordpress.com/?p=14</guid>
		<description><![CDATA[Once I need to write a code which has scenario like depending on various selection call, the specific function. There were more than 40 functions from which only one will be called. All these 40 function were defined in different classes. Easy to write normal code in if-else loops but got second opinion. Reflection is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=14&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<table border="0" width="100%">
<tbody>
<tr>
<td width="100%">
<p style="text-align:left;">Once I need to write a code which has scenario like depending on various selection call, the specific function.<br />
There were more than 40 functions from which only one will be called. All these 40 function were defined in different classes.<br />
Easy to write normal code in if-else loops but got second opinion.</p>
<p style="text-align:left;">Reflection is the best way suggested by a techie friend for this case and it worked gr8. Here the function names can be retrieved from web.config file, no need to recompile if the name of the function to call is changed</p>
<p style="text-align:left;">The following function accepts the name of the class which has the function defined in it, then name of the function to execute and the client&#8217;s name. I am assuming that the types or classes are defined in the same assembly. If it is different then dynamicExecution function can be further parameterized for Path\name of the assembly. Also the function parameters&#8217; array can parameterized if the functions to execute have different number of parameters.</p>
<p style="text-align:left;">Also this answers, How to create instance of class from string</p>
<p style="text-align:left;">Here is the code&#8230;&#8230;&#8230;..</p>
</td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="776">
<tbody>
<tr>
<td>
<p style="font-size:x-medium;"><span style="color:#0000ff;">private</span><span style="font-size:x-medium;"> </span><span style="color:#0000ff;">void </span><span style="font-size:x-medium;">btnExecute_Click</span>(<span style="color:#0000ff;">object </span><span style="font-size:x-medium;">sender, System.EventArgs e)</span><span style="font-size:x-medium;"><br />
{<br />
</span><br />
<span style="color:#008000;"> // If the user is Japanese </span><span style="font-size:x-medium;"><br />
dynamicExecution( &#8220;MyNameSpace.MyClass&#8221;, &#8220;OhaioGozaimasu&#8221;,&#8221;SayuriSan&#8221;);</span></p>
<p><span style="color:#008000;"> // If the user is English </span><br />
<span style="font-size:x-medium;"> dynamicExecution( &#8220;MyNameSpace.MyClass&#8221;, &#8220;GoodMorning&#8221;,&#8221;Alice&#8221;);</span></p>
<p><span style="color:#008000;"> // If the user is Indian</span><br />
<span style="font-size:x-medium;"> dynamicExecution( &#8220;MyNameSpace.MyClass35&#8243;, &#8220;Suprabhat&#8221;,&#8221;3sha&#8221;);</span><br />
<span style="font-size:x-medium;">}</span></p>
<p><span style="color:#0000ff;">private</span><span style="color:#0000ff;"> void</span><span style="font-size:x-medium;"> dynamicExecution(</span><span style="color:#0000ff;">string </span><span style="font-size:x-medium;">ClassName,</span><span style="color:#0000ff;">string</span><span style="font-size:x-medium;"> FunctionName, </span><span style="color:#0000ff;">string</span><span style="font-size:x-medium;"> ClientName )</span><span style="font-size:x-medium;"><br />
{<br />
</span><span style="color:#008000;"> // Following code creates the instance of class dynamically and executes the function</span></p>
<p><span style="color:#008000;"> // You will need the instance of assembly which has the class to be instatiated</span></p>
<p><span style="color:#008000;"> // System.Reflection.Assembly.LoadFrom() this also can be used</span></p>
<p><span style="font-size:x-medium;"> System.Reflection.Assembly assembly = System.Reflection.Assembly.GetEntryAssembly();</span></p>
<p><span style="font-size:x-medium;"> Object [] para = </span><span style="color:#0000ff;">new </span><span style="font-size:x-medium;">Object[1]; </span><span style="color:#008000;">// array for parameters of the function</span></p>
<p><span style="font-size:x-medium;"> para[0]= ClientName ; </span><span style="color:#008000;">// single parameter in this case</span></p>
<p><span style="color:#008000;"> // Create instance of the class Dynamically</span></p>
<p><span style="color:#008000;"> // CreateInstance requires FullPath i.e. with root namespace and sub namespaces of the type</span></p>
<p><span style="color:#0000ff;"> object</span><span style="font-size:x-medium;"> dynMyClass = assembly.CreateInstance(ClassName); </span></p>
<p><span style="color:#008000;"> // Well this is easy!</span></p>
<p><span style="font-size:x-medium;"> dynMyClass.GetType().GetMethod(FunctionName).Invoke(dynMyClass,para);</span></p>
<p><span style="font-size:x-medium;">}</span></p>
<p><span style="font-size:x-medium;"><br />
</span><span style="font-size:x-medium;"><br />
</span><span style="color:#008000;">// This is a sample class</span><br />
<span style="color:#0000ff;">class</span><span style="font-size:x-medium;"> MyClass<br />
</span><span style="font-size:x-medium;">{</span><br />
<span style="color:#0000ff;"> public</span><span style="font-size:x-medium;"> MyClass(){}</span><br />
<span style="color:#0000ff;"> public</span><span style="font-size:x-medium;"> </span><span style="color:#0000ff;">void</span><span style="font-size:x-medium;"> GoodMorning(</span><span style="color:#0000ff;">string </span><span style="font-size:x-medium;">name)</span><span style="font-size:x-medium;"><br />
{<br />
</span><span style="font-size:x-medium;"> MessageBox.Show(&#8220;Good Morning &#8221; + name + &#8220;!&#8221;);<br />
</span><span style="font-size:x-medium;"> }</span><br />
<span style="color:#0000ff;">public</span><span style="font-size:x-medium;"> </span><span style="color:#0000ff;">void</span><span style="font-size:x-medium;"> OhaioGozaimasu(</span><span style="color:#0000ff;">string </span><span style="font-size:x-medium;"> name)</span><span style="font-size:x-medium;"><br />
{<br />
</span><span style="font-size:x-medium;"> MessageBox.Show(name + &#8220;, Ohaio Gozaimasu!&#8221;);</span><br />
<span style="font-size:x-medium;"> }</span><br />
<span style="font-size:x-medium;">}</span></td>
</tr>
</tbody>
</table>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/inquest.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/inquest.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/inquest.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/inquest.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/inquest.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/inquest.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/inquest.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/inquest.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/inquest.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/inquest.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/inquest.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/inquest.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/inquest.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/inquest.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/inquest.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/inquest.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=14&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-rating-enabled sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://inquest.wordpress.com/2008/05/16/reflection-create-dynamic-types-and-execute-methods-runtime/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b40a932f2e805ef0842a691578c08308?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">sandeep</media:title>
		</media:content>
	</item>
		<item>
		<title>Terminate / kill /close process on remote machine using WMI</title>
		<link>http://inquest.wordpress.com/2008/04/08/terminate-process-on-remote-machine-using-wmi/</link>
		<comments>http://inquest.wordpress.com/2008/04/08/terminate-process-on-remote-machine-using-wmi/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 06:44:02 +0000</pubDate>
		<dc:creator>sandeep bharati</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://inquest.wordpress.com/?p=13</guid>
		<description><![CDATA[The WMI technique is very powerful for system related activities. They provide operating system interface. The following code can be used to close instance of visual studio on remote machine provided you have access to it. It kills the instance of it. This way you can make your colleague frustrated. // connection will required user [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=13&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The WMI technique is very powerful for system related activities. They provide operating system interface.</p>
<p>The following code can be used to close instance of visual studio on remote machine provided you have access to it. It kills the instance of it. This way you can make your colleague frustrated.</p>
<p><span style="color:#008000;">// connection will required user having access to remote m/c</span></p>
<p><span style="color:#008000;"> </span></p>
<p><span style="font-size:x-medium;"> System.Management.</span><span style="color:#008080;">ConnectionOptions</span><span style="font-size:x-medium;"><br />
conO = </span><span style="color:#0000ff;">new</span><span style="font-size:x-medium;"> System.Management.</span><span style="color:#008080;">ConnectionOptions</span><span style="font-size:x-medium;">();</span></p>
<p><span style="font-size:x-medium;"> conO.Username = </span><span style="color:#800000;">&quot;DOMAIN\\sandeep&quot;</span><span style="font-size:x-medium;">;<br />
conO.Password = </span>&quot;<span style="color:#800000;">*******</span>&quot;<span style="font-size:x-medium;">;</span></p>
<p><span style="font-size:x-medium;"> System.Management.</span><span style="color:#008080;">ManagementScope</span><span style="font-size:x-medium;"><br />
oMs = </span><span style="color:#0000ff;">new</span><span style="font-size:x-medium;"> System.Management.</span><span style="color:#008080;">ManagementScope</span><span style="font-size:x-medium;">(</span><span style="color:#800000;">@&quot;\\&lt;remoteMachineName&gt;\root\cimv2&quot;</span><span style="font-size:x-medium;">,conO);</span></p>
<p><span style="font-size:x-medium;"> </span><span style="color:#008000;">//get all the Processes running on remote m/c</span></p>
<p><span style="font-size:x-medium;"> System.Management.</span><span style="color:#008080;">ObjectQuery </span><span style="font-size:x-medium;">oQuery = </span><span style="color:#0000ff;">new</span><span style="font-size:x-medium;"> System.Management.</span><span style="color:#008080;">ObjectQuery</span><span style="font-size:x-medium;">(</span><span style="color:#800000;">&quot;Select<br />
* from Win32_Process&quot;</span><span style="font-size:x-medium;">);</span></p>
<p><span style="font-size:x-medium;"> </span><span style="color:#008000;">//Execute the query </span></p>
<p><span style="font-size:x-medium;"> System.Management.</span><span style="color:#008080;">ManagementObjectSearcher </span><span style="font-size:x-medium;">oSearcher = </span><span style="color:#0000ff;">new </span><span style="font-size:x-medium;">System.Management.</span><span style="color:#008080;">ManagementObjectSearcher</span><span style="font-size:x-medium;">(oMs,oQuery);</span></p>
<p><span style="font-size:x-medium;"> </span><span style="color:#008000;">//Get the results</span></p>
<p><span style="font-size:x-medium;"> System.Management.</span><span style="color:#008080;">ManagementObjectCollection </span><span style="font-size:x-medium;">oReturnCollection = oSearcher.Get();</span></p>
<p><span style="font-size:x-medium;"> </span><span style="color:#008000;">//loop through found process and terminate<br />
</span></p>
<p><span style="font-size:x-medium;"> </span><span style="color:#0000ff;">foreach</span><span style="font-size:x-medium;"> (System.Management.</span><span style="color:#008080;">ManagementObject </span><span style="font-size:x-medium;">oReturn </span><span style="color:#0000ff;">in</span><span style="font-size:x-medium;"> oReturnCollection)</span><span style="font-size:x-medium;"><br />
{<br />
</span><span style="color:#0000ff;"> string</span><span style="font-size:x-medium;">[] argList = </span><span style="color:#0000ff;">new</span><span style="font-size:x-medium;"> </span><span style="color:#0000ff;">string</span><span style="font-size:x-medium;">[] { </span><span style="color:#0000ff;">string</span><span style="font-size:x-medium;">.Empty };</span></p>
<p><span style="font-size:x-medium;">//Name of process<br />
</span><span style="color:#0000ff;"> if</span><span style="font-size:x-medium;"> (oReturn[</span><span style="color:#800000;">&quot;Name&quot;</span><span style="font-size:x-medium;">].ToString().ToLower() == </span><span style="color:#800000;">&quot;devenv.exe&quot;</span><span style="font-size:x-medium;">)</span><span style="font-size:x-medium;"><br />
{<br />
</span><span style="color:#0000ff;"> object</span><span style="font-size:x-medium;">[] obj = </span><span style="color:#0000ff;">new</span><span style="font-size:x-medium;"> </span><span style="color:#0000ff;">object</span><span style="font-size:x-medium;">[] { 0 };<br />
oReturn.InvokeMethod(</span><span style="color:#800000;">&quot;Terminate&quot;</span><span style="font-size:x-medium;">, obj);<br />
}<br />
}</span></p>
<p><span style="font-size:x-medium;"> </span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/inquest.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/inquest.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/inquest.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/inquest.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/inquest.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/inquest.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/inquest.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/inquest.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/inquest.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/inquest.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/inquest.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/inquest.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/inquest.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/inquest.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/inquest.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/inquest.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=13&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-rating-enabled sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://inquest.wordpress.com/2008/04/08/terminate-process-on-remote-machine-using-wmi/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b40a932f2e805ef0842a691578c08308?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">sandeep</media:title>
		</media:content>
	</item>
		<item>
		<title>Hey, Scripting Guy!</title>
		<link>http://inquest.wordpress.com/2008/04/08/hey-scripting-guy/</link>
		<comments>http://inquest.wordpress.com/2008/04/08/hey-scripting-guy/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 05:48:33 +0000</pubDate>
		<dc:creator>sandeep bharati</dc:creator>
				<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://inquest.wordpress.com/?p=12</guid>
		<description><![CDATA[very useful one! http://www.microsoft.com/technet/scriptcenter/resources/qanda/all.mspx<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=12&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>very useful one!</p>
<p><img class="alignnone" src="http://img.microsoft.com/library/media/1033/technet/images/scriptcenter/dr_scripto_anim.gif" alt="DRScripto" /></p>
<p><a href="http://www.microsoft.com/technet/scriptcenter/resources/qanda/all.mspx"> http://www.microsoft.com/technet/scriptcenter/resources/qanda/all.mspx </a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/inquest.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/inquest.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/inquest.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/inquest.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/inquest.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/inquest.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/inquest.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/inquest.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/inquest.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/inquest.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/inquest.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/inquest.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/inquest.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/inquest.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/inquest.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/inquest.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=12&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-rating-enabled sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://inquest.wordpress.com/2008/04/08/hey-scripting-guy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b40a932f2e805ef0842a691578c08308?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">sandeep</media:title>
		</media:content>

		<media:content url="http://img.microsoft.com/library/media/1033/technet/images/scriptcenter/dr_scripto_anim.gif" medium="image">
			<media:title type="html">DRScripto</media:title>
		</media:content>
	</item>
		<item>
		<title>Impersonation in ASP.NET : imitating the mannerisms of another person</title>
		<link>http://inquest.wordpress.com/2007/06/08/impersonation-in-aspnet-imitating-the-mannerisms-of-another-person/</link>
		<comments>http://inquest.wordpress.com/2007/06/08/impersonation-in-aspnet-imitating-the-mannerisms-of-another-person/#comments</comments>
		<pubDate>Fri, 08 Jun 2007 06:13:24 +0000</pubDate>
		<dc:creator>sandeep bharati</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://inquest.wordpress.com/2007/06/08/impersonation-in-aspnet-imitating-the-mannerisms-of-another-person/</guid>
		<description><![CDATA[The Following Table Summarize the various settings required to implement impersonation in ASP.NET Anonymous Access (IIS) Authentication Type (IIS) impersonate (Web.config) Impersonated User WindowsIdentity.GetCurrent().Name Allowed NA false Machine_name\ASPNET Allowed NA true Machine_name\IUSR_Machine_name Not Allowed Integrated false Machine_name\ASPNET Not Allowed Integrated true Domain\User Not Allowed Basic false Machine_name\ASPNET Not Allowed Basic true Login box will appear [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=8&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The Following Table Summarize the various settings required to implement impersonation in ASP.NET</p>
<table style="width:505px;height:430px;" border="1" cellspacing="0" cellpadding="3" width="505">
<tbody>
<tr>
<td width="101" valign="top"><strong><span style="font-size:10pt;font-family:Verdana;">Anonymous Access</span></strong><span style="font-size:10pt;font-family:Verdana;"><br />
(IIS)</span></td>
<td width="116" valign="top"><strong><span style="font-size:10pt;font-family:Verdana;">Authentication Type</span></strong><span style="font-size:10pt;font-family:Verdana;"><br />
(IIS) </span></td>
<td width="101" valign="top"><strong><span style="font-size:10pt;font-family:Verdana;">impersonate</span></strong><span style="font-size:10pt;font-family:Verdana;"> (Web.config) </span></td>
<td width="278" valign="top"><strong><span style="font-size:10pt;font-family:Verdana;">Impersonated User  <span style="font-size:10pt;font-family:Verdana;"><br />
WindowsIdentity.GetCurrent().Name</span><span style="font-size:10pt;font-family:Verdana;"><br />
</span> </span></strong></td>
</tr>
<tr>
<td width="101" valign="top"><span style="font-size:10pt;font-family:Verdana;">Allowed </span></td>
<td width="116" valign="top"><span style="font-size:10pt;font-family:Verdana;">NA </span></td>
<td width="101" valign="top"><span style="font-size:10pt;font-family:'Courier New';color:blue;">false</span></td>
<td width="278" valign="top"><em><span style="font-size:10pt;font-family:Verdana;">Machine_name</span></em><span style="font-size:10pt;font-family:Verdana;">\ASPNET<br />
</span></td>
</tr>
<tr>
<td width="101" valign="top"><span style="font-size:10pt;font-family:Verdana;">Allowed </span></td>
<td width="116" valign="top"><span style="font-size:10pt;font-family:Verdana;">NA </span></td>
<td width="101" valign="top"><span style="font-size:10pt;font-family:'Courier New';color:blue;">true</span></td>
<td width="278" valign="top"><em><span style="font-size:10pt;font-family:Verdana;">Machine_name</span></em><span style="font-size:10pt;font-family:Verdana;">\IUSR_<em>Machine_name</em><br />
</span></td>
</tr>
<tr>
<td width="101" valign="top"><span style="font-size:10pt;font-family:Verdana;">Not Allowed </span></td>
<td width="116" valign="top"><span style="font-size:10pt;font-family:Verdana;">Integrated </span></td>
<td width="101" valign="top"><span style="font-size:10pt;font-family:'Courier New';color:blue;">false</span></td>
<td width="278" valign="top"><em><span style="font-size:10pt;font-family:Verdana;">Machine_name</span></em><span style="font-size:10pt;font-family:Verdana;">\ASPNET<br />
</span></td>
</tr>
<tr>
<td width="101" valign="top"><span style="font-size:10pt;font-family:Verdana;">Not Allowed </span></td>
<td width="116" valign="top"><span style="font-size:10pt;font-family:Verdana;">Integrated </span></td>
<td width="101" valign="top"><span style="font-size:10pt;font-family:'Courier New';color:blue;">true</span></td>
<td width="278" valign="top"><em><span style="font-size:10pt;font-family:Verdana;">Domain\User </span></em></td>
</tr>
<tr>
<td width="101" valign="top"><span style="font-size:10pt;font-family:Verdana;">Not Allowed </span></td>
<td width="116" valign="top"><span style="font-size:10pt;font-family:Verdana;">Basic </span></td>
<td width="101" valign="top"><span style="font-size:10pt;font-family:'Courier New';color:blue;">false</span></td>
<td width="278" valign="top"><em><span style="font-size:10pt;font-family:Verdana;">Machine_name</span></em><span style="font-size:10pt;font-family:Verdana;">\ASPNET<br />
</span></td>
</tr>
<tr>
<td width="101" valign="top"><span style="font-size:10pt;font-family:Verdana;">Not Allowed </span></td>
<td width="116" valign="top"><span style="font-size:10pt;font-family:Verdana;">Basic </span></td>
<td width="101" valign="top"><span style="font-size:10pt;font-family:'Courier New';color:blue;">true</span></td>
<td width="278" valign="top"><span style="font-size:10pt;font-family:Verdana;">Login box will appear to enter<br />
username &amp; password. Grant access only for valid username-password. </span></td>
</tr>
<tr>
<td colspan="4" width="597" valign="top"><span style="font-size:10pt;font-family:Verdana;">Note :<br />
</span><span style="font-size:10pt;font-family:Wingdings;"><span>ü<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:'Times New Roman';"> </span></span></span><span style="font-size:10pt;font-family:Verdana;">If valid username/password is provided in web config, in identity tag, then<br />
provided userid will be final impersonated user.<br />
</span><span style="font-size:10pt;font-family:Wingdings;"><br />
<span>ü<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:'Times New Roman';"> </span></span></span><span style="font-size:10pt;font-family:Verdana;">Integrated authentication type will always override the Basic. </span></td>
</tr>
</tbody>
</table>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/inquest.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/inquest.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/inquest.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/inquest.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/inquest.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/inquest.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/inquest.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/inquest.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/inquest.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/inquest.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/inquest.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/inquest.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/inquest.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/inquest.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/inquest.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/inquest.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=8&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-rating-enabled sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://inquest.wordpress.com/2007/06/08/impersonation-in-aspnet-imitating-the-mannerisms-of-another-person/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b40a932f2e805ef0842a691578c08308?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">sandeep</media:title>
		</media:content>
	</item>
		<item>
		<title>Special accounts in windows</title>
		<link>http://inquest.wordpress.com/2007/06/07/special-accounts-in-windows/</link>
		<comments>http://inquest.wordpress.com/2007/06/07/special-accounts-in-windows/#comments</comments>
		<pubDate>Thu, 07 Jun 2007 07:31:19 +0000</pubDate>
		<dc:creator>sandeep bharati</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://inquest.wordpress.com/2007/06/07/special-accounts-in-windows/</guid>
		<description><![CDATA[Name Full Name Description IUSR_machineName Internet Guest Account Built-in account for anonymous access to Internet Information Services IWAM_machineName Launch IIS Process Account Built-in account for Internet Information Services to start out of process applications ASPNET ASP.NET Machine Account Account used for running the ASP.NET worker process (aspnet_wp.exe)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=7&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<table border="1" cellspacing="0" cellpadding="3">
<tbody>
<tr>
<td width="160" align="center" valign="middle"><strong><span style="font-size:10pt;font-family:Verdana;">Name</span></strong></td>
<td width="159" align="center" valign="middle"><strong><span style="font-size:10pt;font-family:Verdana;">Full Name </span></strong></td>
<td width="271" align="center" valign="middle"><strong><span style="font-size:10pt;font-family:Verdana;">Description<br />
</span></strong></td>
</tr>
<tr>
<td style="height:49px;" width="160" valign="top"><span style="font-size:10pt;font-family:Verdana;">IUSR_<em>machineName</em><br />
</span></td>
<td style="height:49px;" width="159" valign="top"><span style="font-size:10pt;font-family:Verdana;">Internet Guest Account </span></td>
<td style="height:49px;" width="271" valign="top"><span style="font-size:10pt;font-family:Verdana;">Built-in account for anonymous<br />
access to Internet Information Services<br />
</span></td>
</tr>
<tr>
<td width="160" valign="top"><span style="font-size:10pt;font-family:Verdana;">IWAM_<em>machineName</em><br />
</span></td>
<td width="159" valign="top"><span style="font-size:10pt;font-family:Verdana;">Launch IIS<br />
Process Account </span></td>
<td width="271" valign="top"><span style="font-size:10pt;font-family:Verdana;">Built-in account for Internet<br />
Information Services to start out of process applications </span></td>
</tr>
<tr>
<td width="160" valign="top"><span style="font-size:10pt;font-family:Verdana;">ASPNET </span></td>
<td width="159" valign="top"><span style="font-size:10pt;font-family:Verdana;">ASP.NET<br />
Machine Account </span></td>
<td width="271" valign="top"><span style="font-size:10pt;font-family:Verdana;">Account used for running the<br />
ASP.NET worker process (aspnet_wp.exe) </span></td>
</tr>
</tbody>
</table>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/inquest.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/inquest.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/inquest.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/inquest.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/inquest.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/inquest.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/inquest.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/inquest.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/inquest.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/inquest.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/inquest.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/inquest.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/inquest.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/inquest.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/inquest.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/inquest.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=7&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-rating-enabled sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://inquest.wordpress.com/2007/06/07/special-accounts-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b40a932f2e805ef0842a691578c08308?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">sandeep</media:title>
		</media:content>
	</item>
		<item>
		<title>System.Web.HttpRequest parameters : HTTP values sent by a client during web request</title>
		<link>http://inquest.wordpress.com/2007/05/17/systemwebhttprequest-parameters-http-values-sent-by-a-client-during-web-request/</link>
		<comments>http://inquest.wordpress.com/2007/05/17/systemwebhttprequest-parameters-http-values-sent-by-a-client-during-web-request/#comments</comments>
		<pubDate>Thu, 17 May 2007 06:02:21 +0000</pubDate>
		<dc:creator>sandeep bharati</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://inquest.wordpress.com/2007/05/17/systemwebhttprequest-parameters-http-values-sent-by-a-client-during-web-request/</guid>
		<description><![CDATA[Following code retreives the parameters sent. Also we can use page&#8217;s Request object directly which exposes most of the properties but not all like username, password. The password value is set only when application uses IIS basic authentication. string[] allKeys = this.Request.Params.AllKeys; int count = allKeys.Length-1; while( count &#62;= 0) { Response.Write(allKeys[count]+ &#8221; = &#8220;+ [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=5&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Following code retreives the parameters sent. Also we can use page&#8217;s Request object directly which exposes most of the properties but not all like username, password. The password value is set only when application uses IIS basic authentication.</p>
<p>string<span style="font-size:x-medium;">[] allKeys = </span><span style="color:#0000ff;font-size:x-medium;">this</span><span style="font-size:x-medium;">.Request.Params.AllKeys;</span><span style="font-size:x-medium;"><br />
</span><span style="color:#0000ff;font-size:x-medium;"> int</span><span style="font-size:x-medium;"> count =  allKeys.Length-1;<br />
</span><span style="color:#0000ff;font-size:x-medium;"> while</span><span style="font-size:x-medium;">( count &gt;=  0)</span><span style="font-size:x-medium;"><br />
{<br />
Response.Write(allKeys[count]+ &#8221; = &#8220;+ </span><span style="color:#0000ff;font-size:x-medium;">this</span><span style="font-size:x-medium;">.Request.Params[allKeys[count]].ToString()  +</span><span style="font-size:x-medium;"> System.Web.UI.Html32TextWriter.TagLeftChar +    &#8220;br&#8221;+System.Web.UI.Html32TextWriter.TagRightChar);<br />
count&#8211;;<br />
}</span></p>
<p>The output is as follows (useful parameters are marked in bold)</p>
<p><span style="font-family:Verdana;font-size:x-medium;">HTTP_USER_AGENT  =  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705;<br />
.NET CLR 1.1.4322)<br />
HTTP_HOST = localhost<br />
HTTP_ACCEPT_LANGUAGE = en-us<br />
HTTP_ACCEPT_ENCODING = gzip, deflate<br />
HTTP_ACCEPT = */*<br />
</span><span style="font-family:Verdana;font-size:x-medium;">HTTP_CONNECTION = Keep-Alive<br />
URL = /WebApplication1/WebForm1.aspx<br />
SERVER_SOFTWARE = Microsoft-IIS/5.1<br />
SERVER_PROTOCOL = HTTP/1.1<br />
SERVER_PORT_SECURE = 0<br />
SERVER_PORT = 80<br />
SERVER_NAME = localhost<br />
SCRIPT_NAME = /WebApplication1/WebForm1.aspx<br />
REQUEST_METHOD = GET<br />
REMOTE_PORT = 1052<br />
REMOTE_HOST = 127.0.0.1<br />
REMOTE_ADDR = 127.0.0.1<br />
<strong>QUERY_STRING =</strong><br />
<strong>PATH_TRANSLATED = c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx<br />
PATH_INFO = /WebApplication1/WebForm1.aspx</strong><br />
LOCAL_ADDR = 127.0.0.1<br />
INSTANCE_META_PATH = /LM/W3SVC/1<br />
INSTANCE_ID = 1<br />
HTTPS_SERVER_SUBJECT =<br />
HTTPS_SERVER_ISSUER =<br />
HTTPS_SECRETKEYSIZE =<br />
HTTPS_KEYSIZE =<br />
HTTPS = off<br />
GATEWAY_INTERFACE = CGI/1.1<br />
CONTENT_TYPE =<br />
CONTENT_LENGTH = 0<br />
CERT_SUBJECT =<br />
CERT_SERVER_SUBJECT =<br />
CERT_SERVER_ISSUER =<br />
CERT_SERIALNUMBER =<br />
CERT_SECRETKEYSIZE =<br />
CERT_KEYSIZE =<br />
CERT_ISSUER =<br />
CERT_FLAGS =<br />
<strong>CERT_COOKIE =<br />
REMOTE_USER =<br />
LOGON_USER =<br />
AUTH_PASSWORD =<br />
AUTH_USER =<br />
AUTH_TYPE =<br />
APPL_PHYSICAL_PATH = c:\inetpub\wwwroot\WebApplication1\</strong><br />
APPL_MD_PATH = /LM/W3SVC/1/Root/WebApplication1<br />
ALL_RAW = Connection: Keep-Alive Accept: */* Accept-Encoding: gzip, deflate<br />
Accept-Language: en-us Host: localhost User-Agent: Mozilla/4.0 (compatible;<br />
MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)<br />
ALL_HTTP = HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:*/*<br />
HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_ACCEPT_LANGUAGE:en-us<br />
HTTP_HOST:localhost HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows<br />
NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)<br />
ASP.NET_SessionId = vc51gu45yek45zecmsjezf45</span><span style="font-family:Verdana;font-size:x-medium;"> </span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/inquest.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/inquest.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/inquest.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/inquest.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/inquest.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/inquest.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/inquest.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/inquest.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/inquest.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/inquest.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/inquest.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/inquest.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/inquest.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/inquest.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/inquest.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/inquest.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=5&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-rating-enabled sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://inquest.wordpress.com/2007/05/17/systemwebhttprequest-parameters-http-values-sent-by-a-client-during-web-request/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b40a932f2e805ef0842a691578c08308?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">sandeep</media:title>
		</media:content>
	</item>
		<item>
		<title>How to compare versions of two Assemblies?</title>
		<link>http://inquest.wordpress.com/2007/05/11/how-to-compare-versions/</link>
		<comments>http://inquest.wordpress.com/2007/05/11/how-to-compare-versions/#comments</comments>
		<pubDate>Fri, 11 May 2007 16:23:18 +0000</pubDate>
		<dc:creator>sandeep bharati</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://inquest.wordpress.com/2007/05/11/how-to-compare-versions/</guid>
		<description><![CDATA[We can make use of System.Version class. int check; System.Version version = new Version(&#8220;1.1.234.999&#8243;); check = version.CompareTo(new Version(&#8220;1.1.234.998&#8243;)); //check will be 1 check = version.CompareTo(new Version(&#8220;1.1.234.999&#8243;)); //check will be 0 check = version.CompareTo(new Version(&#8220;1.1.234.1000&#8243;)); //check will be -1<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=3&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We can make use of <strong>System.Version</strong> class.</p>
<p><span style="color:#0000ff;font-size:x-small;">int</span><span style="font-size:x-small;"> check;</span><span style="font-size:x-small;"> </span></p>
<p><span style="font-size:x-small;">System.Version version = <span style="color:#0000ff;font-size:x-small;">new</span><span style="font-size:x-small;"> Version(&#8220;1.1.234.999&#8243;);</span><span style="font-size:x-small;"> </span></span></p>
<p><span style="font-size:x-small;"><span style="font-size:x-small;">check = version.CompareTo(<span style="color:#0000ff;font-size:x-small;">new</span><span style="font-size:x-small;"> Version(&#8220;1.1.234.998&#8243;)); </span><span style="color:#008000;font-size:x-small;">//check will be   1</span></span></span><span style="font-size:x-small;"> </span></p>
<p><span style="font-size:x-small;"><span style="font-size:x-small;">check = version.CompareTo(</span><span style="color:#0000ff;font-size:x-small;">new</span><span style="font-size:x-small;"> Version(&#8220;1.1.234.999&#8243;)); </span><span style="color:#008000;font-size:x-small;">//check will be  0</span></span></p>
<p><span style="font-size:x-small;"><span style="font-size:x-small;">check = version.CompareTo(</span><span style="color:#0000ff;font-size:x-small;">new</span><span style="font-size:x-small;"> Version(&#8220;1.1.234.1000&#8243;)); </span><span style="color:#008000;font-size:x-small;">//check will be  -1</span></span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/inquest.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/inquest.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/inquest.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/inquest.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/inquest.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/inquest.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/inquest.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/inquest.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/inquest.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/inquest.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/inquest.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/inquest.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/inquest.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/inquest.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/inquest.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/inquest.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=inquest.wordpress.com&amp;blog=925743&amp;post=3&amp;subd=inquest&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-rating-enabled sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://inquest.wordpress.com/2007/05/11/how-to-compare-versions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b40a932f2e805ef0842a691578c08308?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">sandeep</media:title>
		</media:content>
	</item>
	</channel>
</rss>
