<?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/"
	>

<channel>
	<title>..::\\ www.christiano.ch //::.. &#187; IIS</title>
	<atom:link href="http://www.christiano.ch/wordpress/category/microsoft/iis/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.christiano.ch/wordpress</link>
	<description>christiano.ch blog - personal knowledge base, news, memoires et cetera</description>
	<lastBuildDate>Fri, 06 Jan 2012 15:28:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<meta xmlns="http://www.w3.org/1999/xhtml" name="robots" content="noindex,follow" />
		<item>
		<title>VS.NET TFS: IISReset and The system cannot find the file specified. (2147942402, 80070002)</title>
		<link>http://www.christiano.ch/wordpress/2010/05/01/vs-net-tfs-iisreset-and-the-system-cannot-find-the-file-specified-2147942402-80070002/</link>
		<comments>http://www.christiano.ch/wordpress/2010/05/01/vs-net-tfs-iisreset-and-the-system-cannot-find-the-file-specified-2147942402-80070002/#comments</comments>
		<pubDate>Sat, 01 May 2010 06:59:25 +0000</pubDate>
		<dc:creator>christian</dc:creator>
				<category><![CDATA[IIS]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows General]]></category>
		<category><![CDATA[IISReset]]></category>
		<category><![CDATA[TFS]]></category>

		<guid isPermaLink="false">http://www.christiano.ch/wordpress/2010/05/01/vs-net-tfs-iisreset-and-the-system-cannot-find-the-file-specified-2147942402-80070002/</guid>
		<description><![CDATA[Okay, today i installed Microsoft Team Foundation Server 2010. At the end of the Setup, i had a warning regarding the configuration of the IIS Web Server Part. In the result i tried to reset the IIS using iisreset.exe. What &#8230; <a href="http://www.christiano.ch/wordpress/2010/05/01/vs-net-tfs-iisreset-and-the-system-cannot-find-the-file-specified-2147942402-80070002/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<table border="0" cellspacing="0" cellpadding="2" width="675">
<tbody>
<tr>
<td valign="top" width="593">Okay, today i installed Microsoft Team Foundation Server 2010. At the end of the Setup, i had a warning regarding the configuration of the IIS Web Server Part. In the result i tried to reset the IIS using <strong><em>iisreset.exe</em></strong>. What i got is an error message stating:          <br /><strong><em>The system cannot find the file specified. (2147942402, 80070002)</em></strong></td>
<td valign="top" width="81"><a href="http://www.christiano.ch/wordpress/wp-content/uploads/2010/05/Logo_Microsoft.Team_.foundation.server.2010.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Logo_Microsoft.Team.foundation.server.2010" border="0" alt="Logo_Microsoft.Team.foundation.server.2010" src="http://www.christiano.ch/wordpress/wp-content/uploads/2010/05/Logo_Microsoft.Team_.foundation.server.2010_thumb.png" width="180" height="88" /></a> </td>
</tr>
</tbody>
</table>
<p> <span id="more-945"></span>
<p>If you are Installing Microsoft TFS 2010 RC or RTM, you may notice after the installation a warning that IISRESET failed.&#160; The warning instructs you to run it manually.&#160; Running it manually results in the same error:</p>
<p><strong><em>The system cannot find the file specified. (2147942402, 80070002)</em></strong></p>
<p><a href="http://www.christiano.ch/wordpress/wp-content/uploads/2010/05/IISReset_The_System_cannot_find_the_file_specified_2147942402_80070002.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="IISReset_The_System_cannot_find_the_file_specified_2147942402_80070002" border="0" alt="IISReset_The_System_cannot_find_the_file_specified_2147942402_80070002" src="http://www.christiano.ch/wordpress/wp-content/uploads/2010/05/IISReset_The_System_cannot_find_the_file_specified_2147942402_80070002_thumb.png" width="667" height="332" /></a> </p>
<p>IISRESET failing is not a problem for TFS, but nevertheless you may want to address this.&#160; To fix it, open Add / Remove Programs (appwiz.cpl) and run Repair on the .NET 4.0 Client component.&#160; This requires a reboot.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=VS.NET+TFS%3A+IISReset+and+The+system+cannot+find+the+file+specified.+%282147942402%2C+80070002%29+http%3A%2F%2Fchristiano.ch%2Fwordpress%2F%3Fp%3D945" title="Post to Twitter"><img class="nothumb" src="http://www.christiano.ch/wordpress/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=VS.NET+TFS%3A+IISReset+and+The+system+cannot+find+the+file+specified.+%282147942402%2C+80070002%29+http%3A%2F%2Fchristiano.ch%2Fwordpress%2F%3Fp%3D945" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.christiano.ch/wordpress/2010/05/01/vs-net-tfs-iisreset-and-the-system-cannot-find-the-file-specified-2147942402-80070002/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IIS: Choose the .NET Framework Version for Application Pool</title>
		<link>http://www.christiano.ch/wordpress/2009/12/03/iis-choose-the-net-framework-version-for-application-pool/</link>
		<comments>http://www.christiano.ch/wordpress/2009/12/03/iis-choose-the-net-framework-version-for-application-pool/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 06:26:35 +0000</pubDate>
		<dc:creator>christian</dc:creator>
				<category><![CDATA[IIS]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://www.christiano.ch/wordpress/2009/12/03/iis-choose-the-net-framework-version-for-application-pool/</guid>
		<description><![CDATA[Okay, with the upcoming Microsoft.NET Framework 4.0 (currently in Beta2 Stage), IIS Application Pool can be run under either Framework Version 2.0 or Framework Version 4.0. If you should receive this error Message, just go switching the .NET Framework Version &#8230; <a href="http://www.christiano.ch/wordpress/2009/12/03/iis-choose-the-net-framework-version-for-application-pool/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<table border="0" cellspacing="0" cellpadding="2" width="675">
<tbody>
<tr>
<td valign="top" width="602">Okay, with the upcoming Microsoft.NET Framework 4.0 (currently in Beta2 Stage), IIS Application Pool can be run under either Framework Version 2.0 or Framework Version 4.0.</td>
<td valign="top" width="72"><a href="http://www.christiano.ch/wordpress/wp-content/uploads/2009/12/Logo_IIS71.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Logo_IIS7" border="0" alt="Logo_IIS7" src="http://www.christiano.ch/wordpress/wp-content/uploads/2009/12/Logo_IIS7_thumb1.png" width="150" height="87" /></a> </td>
</tr>
</tbody>
</table>
<p> <span id="more-812"></span>
<p>If you should receive this error Message, just go switching the .NET Framework Version for the affected Application Pool under IIS.</p>
<p><font color="#800000">Error: The application pool that you are trying to use has the &#8216;managedRuntimeVersion&#8217; property set to &#8216;v2.0&#8242;. This application requires &#8216;v4.0&#8242;.     <br />Error count: 1.</font></p>
<p>Open IIS</p>
<p>Navigate to the affected Server, Select Application Pools. Now double-click the DefaultAppPool and choose .NET Freamework v4.0.21006 (Beta2 atm)</p>
<p><strong>Screenshot</strong></p>
<p><strong></strong></p>
<p><font color="#800000"><a href="http://www.christiano.ch/wordpress/wp-content/uploads/2009/12/IIS_ApplicationPool_Framework_4.0.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="IIS_ApplicationPool_Framework_4.0" border="0" alt="IIS_ApplicationPool_Framework_4.0" src="http://www.christiano.ch/wordpress/wp-content/uploads/2009/12/IIS_ApplicationPool_Framework_4.0_thumb.png" width="881" height="709" /></a> </font></p>
<p><font color="#000000">you’re done!</font></p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=IIS%3A+Choose+the+.NET+Framework+Version+for+Application+Pool+http%3A%2F%2Fchristiano.ch%2Fwordpress%2F%3Fp%3D812" title="Post to Twitter"><img class="nothumb" src="http://www.christiano.ch/wordpress/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=IIS%3A+Choose+the+.NET+Framework+Version+for+Application+Pool+http%3A%2F%2Fchristiano.ch%2Fwordpress%2F%3Fp%3D812" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.christiano.ch/wordpress/2009/12/03/iis-choose-the-net-framework-version-for-application-pool/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IIS7: Web Application writing to Event Log generates Security Exception</title>
		<link>http://www.christiano.ch/wordpress/2009/12/02/iis7-web-application-writing-to-event-log-generates-security-exception/</link>
		<comments>http://www.christiano.ch/wordpress/2009/12/02/iis7-web-application-writing-to-event-log-generates-security-exception/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 07:08:51 +0000</pubDate>
		<dc:creator>christian</dc:creator>
				<category><![CDATA[IIS]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.christiano.ch/wordpress/2009/12/02/iis7-web-application-writing-to-event-log-generates-security-exception/</guid>
		<description><![CDATA[Every tried to write to the Application Event Log out of a Web Application running in Windows Server 2008 / IIS7? Well, i just tried that and spent about an hour to figure out, how to ‘allow’ the Web Application &#8230; <a href="http://www.christiano.ch/wordpress/2009/12/02/iis7-web-application-writing-to-event-log-generates-security-exception/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<table border="0" cellspacing="0" cellpadding="2" width="675">
<tbody>
<tr>
<td valign="top" width="630">Every tried to write to the Application Event Log out of a Web Application running in Windows Server 2008 / IIS7? Well, i just tried that and spent about an hour to figure out, how to ‘allow’ the Web Application to write to the Event Log.          </td>
<td valign="top" width="44"><a href="http://www.christiano.ch/wordpress/wp-content/uploads/2009/12/Logo_IIS72.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Logo_IIS7" border="0" alt="Logo_IIS7" src="http://www.christiano.ch/wordpress/wp-content/uploads/2009/12/Logo_IIS7_thumb2.png" width="150" height="88" /></a> </td>
</tr>
</tbody>
</table>
<p> <span id="more-807"></span>
<p>using the following snippet in my code: </p>
<p><font face="Courier"><strong>EventLog evtLog = new EventLog();        <br />evtLog.Source = &quot;DEMO.Web&quot;;         <br />evtLog.WriteEntry(&quot;TEST&quot;);</strong></font></p>
<p>(ASP Handler Class) &#8211; (.ashx extension) resulted in a:</p>
<p><font face="Courier">Server Error in &#8216;/DEMO/test&#8217; Application.</font></p>
<p><font face="Courier">Security Exception </font></p>
<p><font face="Courier">Description: The application attempted to perform an operation not allowed by the security policy.&#160; To grant this application the required permission please contact your system administrator or change the application&#8217;s trust level in the configuration file.      <br /></font><font face="Courier">Exception Details: System.Security.SecurityException: The source was not found, but some or all event logs could not be searched.&#160; Inaccessible logs: Security. </font></p>
<p><font face="Courier">Source Error:      <br /></font><font face="Courier">An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.&#160; </font></p>
<p><font face="Courier">Stack Trace:      <br /></font><font face="Courier">[SecurityException: The source was not found, but some or all event logs could not be searched.&#160; Inaccessible logs: Security.]      <br /></font><font face="Courier">System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly) +563      <br /></font><font face="Courier">System.Diagnostics.EventLog.SourceExists(String source, String machineName) +264      <br /></font><font face="Courier">System.Diagnostics.EventLog.VerifyAndCreateSource(String sourceName, String currentMachineName) +84      <br /></font><font face="Courier">System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +377      <br /></font><font face="Courier">System.Diagnostics.EventLog.WriteEntry(String message) +36      <br /></font><font face="Courier">DEMOProject.Web.DEMO.ProcessRequest(HttpContext context) in D:\Development\DEMO.ashx.cs:25      <br /></font><font face="Courier">System.Web.CallHandlerExecutionStep.System.Web.      <br />HttpApplication.IExecutionStep.Execute() +599       <br /></font><font face="Courier">System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +171</font></p>
<p><font face="Courier"></font></p>
<p>I searched for a while until i found this one here:</p>
<p>Network Service is allowed <a href="http://msdn.microsoft.com/en-us/library/ms998320.aspx#paght000015%5Feventlogaccess">to <em>write</em> to the Event Log</a>, but not create an event source. you could give permissions to <code>HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\</code> to allow it to create &#8211; but if you&#8217;ve already created it at install time, there&#8217;s no need.</p>
<p>It&#8217;s possible that it&#8217;s failing on the <code>SourceExists</code> as well &#8211; since that requires enumerating the same registry key. I&#8217;d probably just remove the SourceExists/Create check and trust that it&#8217;s there &#8211; if you&#8217;re anonymous, you can&#8217;t create it anyway.</p>
<p>So i just added the <strong><em>Network Service </em></strong>Account to the EventLog Key granting Full Control for the key and all of its sub keys.</p>
<p>Path is: </p>
<p><strong><em>Screenshot:        <br /></em></strong></p>
<p><a href="http://www.christiano.ch/wordpress/wp-content/uploads/2009/12/Registry_EventLog_Key_Path.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="Registry_EventLog_Key_Path" border="0" alt="Registry_EventLog_Key_Path" align="left" src="http://www.christiano.ch/wordpress/wp-content/uploads/2009/12/Registry_EventLog_Key_Path_thumb.png" width="402" height="30" /></a></p>
<p>&#160;</p>
<p>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog </p>
<p>&#160;</p>
<p><strong><em>Screenshot:</em></strong></p>
<p><a href="http://www.christiano.ch/wordpress/wp-content/uploads/2009/12/Registry_EventLog_Key_Permissions.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Registry_EventLog_Key_Permissions" border="0" alt="Registry_EventLog_Key_Permissions" src="http://www.christiano.ch/wordpress/wp-content/uploads/2009/12/Registry_EventLog_Key_Permissions_thumb.png" width="610" height="416" /></a> </p>
<p>Now we’re almost done. Now, don’t forget to create the corresponding Application-Event-Source-Whatever-Key! In this case/example the Key is named: <strong><em>DEMO.Web</em></strong></p>
<p><strong><em>Screenshot:</em></strong></p>
<p><a href="http://www.christiano.ch/wordpress/wp-content/uploads/2009/12/Registry_EventLog_SubKey.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Registry_EventLog_SubKey" border="0" alt="Registry_EventLog_SubKey" src="http://www.christiano.ch/wordpress/wp-content/uploads/2009/12/Registry_EventLog_SubKey_thumb.png" width="338" height="374" /></a> </p>
</p>
<p>Now, try it again, logging to Event Manager should be working fine.. </p>
<p><a href="http://www.christiano.ch/wordpress/wp-content/uploads/2009/12/EventLogResult.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="EventLogResult" border="0" alt="EventLogResult" src="http://www.christiano.ch/wordpress/wp-content/uploads/2009/12/EventLogResult_thumb.png" width="625" height="614" /></a></p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=IIS7%3A+Web+Application+writing+to+Event+Log+generates+Security+Exception+http%3A%2F%2Fchristiano.ch%2Fwordpress%2F%3Fp%3D807" title="Post to Twitter"><img class="nothumb" src="http://www.christiano.ch/wordpress/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=IIS7%3A+Web+Application+writing+to+Event+Log+generates+Security+Exception+http%3A%2F%2Fchristiano.ch%2Fwordpress%2F%3Fp%3D807" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.christiano.ch/wordpress/2009/12/02/iis7-web-application-writing-to-event-log-generates-security-exception/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

