<?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>Dev Team Assemble &#187; IIS</title>
	<atom:link href="http://www.calvinirwin.net/tag/iis/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.calvinirwin.net</link>
	<description>Evil beware!</description>
	<lastBuildDate>Mon, 06 Feb 2012 18:42:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Great Post on ASP.NET Caching</title>
		<link>http://www.calvinirwin.net/2010/04/14/great-post-on-asp-net-caching/</link>
		<comments>http://www.calvinirwin.net/2010/04/14/great-post-on-asp-net-caching/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 13:46:12 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[windows 2008 r2]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=250</guid>
		<description><![CDATA[I came across a great post today that talks about ASP.NET caching (applies to SharePoint) and what to look for.  Thanks to Gunnar Peipman for the great insight.
http://weblogs.asp.net/gunnarpeipman/archive/2010/04/02/measuring-asp-net-and-sharepoint-output-cache.aspx
Basically you need to setup the following performance counters in windows:

Total number of objects added
Total object discards
Cache hit count
Cache hit ratio




Technorati Tags: ASP.NET, IIS, Windows, windows 2008 r2


]]></description>
			<content:encoded><![CDATA[<p>I came across a great post today that talks about ASP.NET caching (applies to SharePoint) and what to look for.  Thanks to Gunnar Peipman for the great insight.</p>
<p><a href="http://weblogs.asp.net/gunnarpeipman/archive/2010/04/02/measuring-asp-net-and-sharepoint-output-cache.aspx">http://weblogs.asp.net/gunnarpeipman/archive/2010/04/02/measuring-asp-net-and-sharepoint-output-cache.aspx</a></p>
<p>Basically you need to setup the following performance counters in windows:</p>
<ul>
<li>Total number of objects added</li>
<li>Total object discards</li>
<li>Cache hit count</li>
<li>Cache hit ratio</li>
</ul>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/ASP.NET' rel='tag' target='_self'>ASP.NET</a>, <a class='technorati-link' href='http://technorati.com/tag/IIS' rel='tag' target='_self'>IIS</a>, <a class='technorati-link' href='http://technorati.com/tag/Windows' rel='tag' target='_self'>Windows</a>, <a class='technorati-link' href='http://technorati.com/tag/windows+2008+r2' rel='tag' target='_self'>windows 2008 r2</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2010/04/14/great-post-on-asp-net-caching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>503 Error SharePoint &#8211; Service Unavailable</title>
		<link>http://www.calvinirwin.net/2009/09/08/503-error-sharepoint-service-unavailable/</link>
		<comments>http://www.calvinirwin.net/2009/09/08/503-error-sharepoint-service-unavailable/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 03:32:28 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[wsp builder]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=199</guid>
		<description><![CDATA[I started getting this error recently on my development box after I started using WSP Builder.  I really like this program but I was a little put off by this error.  Obvisouly it is recycling  the worker process or something along those lines (too lazy to look it up).  I am fine with it when it comes [...]]]></description>
			<content:encoded><![CDATA[<p>I started getting this error recently on my development box after I started using WSP Builder.  I really like this program but I was a little put off by this error.  Obvisouly it is recycling  the worker process or something along those lines (too lazy to look it up).  I am fine with it when it comes back online after a few seconds but I was having instances where it was hanging there...stuck in 503 limbo. </p>
<p>Turns out the problem is the application pool is stuck in a stopped state and the fix is simply enough to restart it.</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/error' rel='tag' target='_self'>error</a>, <a class='technorati-link' href='http://technorati.com/tag/IIS' rel='tag' target='_self'>IIS</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a>, <a class='technorati-link' href='http://technorati.com/tag/wsp+builder' rel='tag' target='_self'>wsp builder</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/09/08/503-error-sharepoint-service-unavailable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPException: SharePoint cannot find the user &#8211; SharePoint SPWeb.EnsureUser() and a Custom MembershipProvider</title>
		<link>http://www.calvinirwin.net/2009/08/05/sharepoint-spweb-ensureuser-and-thecustom-membership-provider/</link>
		<comments>http://www.calvinirwin.net/2009/08/05/sharepoint-spweb-ensureuser-and-thecustom-membership-provider/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 22:22:28 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[MembershipProvider]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=90</guid>
		<description><![CDATA[Its seems that SharePoint has a knack for surprising me with seriously strange errors sometimes.  Usually at the core of the error there is a sound explanation as to why this is happening but nonetheless I am not pleased with the obscurity of them sometimes.  Case in point, while working on a Console [...]]]></description>
			<content:encoded><![CDATA[<p>Its seems that SharePoint has a knack for surprising me with seriously strange errors sometimes.  Usually at the core of the error there is a sound explanation as to why this is happening but nonetheless I am not pleased with the obscurity of them sometimes.  Case in point, while working on a Console application that would load FBA (Forms Based Authentication) users into a sharepoint sie collection and then create a site for each one (granting permissions and so on) I came across a very strange error - <strong>SPException: SharePoint cannot find the user.</strong></p>
<p>This kind of surprised me at first and I was wondering if somehow my <strong>CustomMembershipProvider</strong> setup stopped working on my portal site, but that was fine. So after hammering away at it for a while I came across a <a href="http://blog.mastykarz.nl/inconvenient-programmatically-sharepoint-users-spweb-ensureuser/">great article written by Waldek Mastykarz</a> on this exact problem.  After reading through his investigation it makes sense why it doesn't work in a console application but it works under the context of a SharePoint website. Essentially the web application has access to a context object and this has access to the providers node in your web.config file,  BUT the console application does not have this information available.  So when the SharePoint assemblies attempt to access this information they cannot because it does not exist.</p>
<p>The way around this is to create an HttpContext in your application before attempting to run <code>SPWeb.EnsureUser("blah")</code> like so:</p>
<pre>
<div class="code">
if (HttpContext.Current == null)
{
     HttpRequest request = new HttpRequest("", web.Url, "");
     HttpContext.Current = new HttpContext(request,
     new HttpResponse(new StringWriter()));
     HttpContext.Current.Items["HttpHandlerSPWeb"] = web;
}</div>
</pre>
<p>Then add the system.web/membership/providers node to your app.config file (which you may have to create in the project)..  Mine looks like so:</p>
<pre>
<div class="code">&lt;system.web&gt;
     &lt;membership&gt;
          &lt;providers&gt;
          &lt;add name="CustomSqlProvider" applicationName="/Portal"
            connectionStringName="sqlData"
            type="CustomProviders.CustomSqlMembershipProvider,
            CustomProviders, Version=1.0.0.0, Culture=neutral,
            PublicKeyToken=91a4fcd60b73a0e8" /&gt;
          &lt;/providers&gt;
     &lt;/membership&gt;
&lt;/system.web&gt;
&lt;connectionStrings&gt;
     &lt;add name="sqlData" connectionString="Data Source=sqlpd;
       Initial Catalog=PUsers; Integrated Security=True;
       MultipleActiveResultSets=True "
       providerName="System.Data.SqlClient" /&gt;
&lt;/connectionStrings&gt;</div>
</pre>
<p>After adding this information and running a few tests it started to work.  In fact it worked really well on my dev box...the only problem was it was a little intermittent on my production machine.  Which is funny because the provider on the site itself works just fine all the time but in order to get my console application working (the EnsureUser() portion) the site would require an IIS reset.  This is the one MAJOR stumbling block that I have yet to overcome...the only saving grace I have is that I can import the users manually into the system first using the UI and then run my console application that will load the sites and grant permissions to sites based on an external configuration file.</p>
<p>Many thanks to <a href="http://blog.mastykarz.nl"><cite>Waldek Mastykarz</cite></a> for all his help on this one so far...I know I will be coming back to this one in the near future but my head hurts a little and I need a beer.</p>
<p>Canadian SharePint event anyone?</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Development' rel='tag' target='_self'>Development</a>, <a class='technorati-link' href='http://technorati.com/tag/IIS' rel='tag' target='_self'>IIS</a>, <a class='technorati-link' href='http://technorati.com/tag/MembershipProvider' rel='tag' target='_self'>MembershipProvider</a>, <a class='technorati-link' href='http://technorati.com/tag/Security' rel='tag' target='_self'>Security</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/08/05/sharepoint-spweb-ensureuser-and-thecustom-membership-provider/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>URL Rewriter</title>
		<link>http://www.calvinirwin.net/2009/07/26/url-rewriter/</link>
		<comments>http://www.calvinirwin.net/2009/07/26/url-rewriter/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 18:59:46 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[url rewriter]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=25</guid>
		<description><![CDATA[I came across this neat tool (well a colleague of mine did and told me about it) from Helicon called URL Rewriter. Basically it allows you to use an ISAPI filter to rewrite the url that the server uses to work with in IIS and is essentially a copy of the mod_rewrite utility available in [...]]]></description>
			<content:encoded><![CDATA[<p>I came across this neat tool (well a colleague of mine did and told me about it) from Helicon called<a href="http://www.helicontech.com/"> URL Rewriter</a>. Basically it allows you to use an ISAPI filter to rewrite the url that the server uses to work with in IIS and is essentially a copy of the mod_rewrite utility available in Apache.</p>
<p>It uses Regular expressions...so if you are not an expert in those (as I am clearly not) then this little tidbit of code may help. It allows you to rewrite the url that comes in as subdomain.domain.com as domain.com/subdomain. The top portion is the header and sets up logging and such...the real meat is the last two lines.</p>
<p>Here it is</p>
<p># Helicon ISAPI_Rewrite configuration file<br />
# Version 3.1.0.48<br />
RewriteEngine On<br />
RewriteCompatibility2 On<br />
RepeatLimit 200<br />
RewriteBase<br />
ReWriteLog C:\rewrite.log<br />
RewriteLogLevel 9</p>
<p>RewriteCond %{HTTP_HOST} ^(?!www)(\w+).christiedigital\.com<br />
RewriteRule (.*) /%1/$1 [L]</p>
<p>Hope this helps</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Development' rel='tag' target='_self'>Development</a>, <a class='technorati-link' href='http://technorati.com/tag/IIS' rel='tag' target='_self'>IIS</a>, <a class='technorati-link' href='http://technorati.com/tag/mod_rewrite' rel='tag' target='_self'>mod_rewrite</a>, <a class='technorati-link' href='http://technorati.com/tag/url+rewriter' rel='tag' target='_self'>url rewriter</a>, <a class='technorati-link' href='http://technorati.com/tag/Windows' rel='tag' target='_self'>Windows</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/07/26/url-rewriter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint Inline Code</title>
		<link>http://www.calvinirwin.net/2009/07/26/sharepoint-inline-code/</link>
		<comments>http://www.calvinirwin.net/2009/07/26/sharepoint-inline-code/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 18:56:58 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=22</guid>
		<description><![CDATA[Inline code is disabled in sharepoint 2007 (not sure about SPS 2003) with the exception of files in the _layouts directory and will throw an error.  I was researching this a while back and thought I would throw it up here so I don't forget...maybe you can get some use out this article:
http://msdn.microsoft.com/en-us/library/bb862025.aspx
Essentially you need [...]]]></description>
			<content:encoded><![CDATA[<p>Inline code is disabled in sharepoint 2007 (not sure about SPS 2003) with the exception of files in the _layouts directory and will throw an error.  I was researching this a while back and thought I would throw it up here so I don't forget...maybe you can get some use out this article:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb862025.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/bb862025.aspx</a></p>
<p>Essentially you need to add a PageParserPath entry to the web.config file for the web application</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/error' rel='tag' target='_self'>error</a>, <a class='technorati-link' href='http://technorati.com/tag/IIS' rel='tag' target='_self'>IIS</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/07/26/sharepoint-inline-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Access Denied &#8211; Enabling Publishing Features in SharePoint</title>
		<link>http://www.calvinirwin.net/2009/07/26/access-denied-enabling-publishing-features-in-sharepoint/</link>
		<comments>http://www.calvinirwin.net/2009/07/26/access-denied-enabling-publishing-features-in-sharepoint/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 18:53:26 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[IIS]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=20</guid>
		<description><![CDATA[This is kind of of a weird error and it didn't make sense to me at first (still doesn't really). The best workaround I could find on the net was to temporarily change the application to run in the application pool of the central admin site.
Steps:

Change the AppPool for the app to be the same [...]]]></description>
			<content:encoded><![CDATA[<p>This is kind of of a weird error and it didn't make sense to me at first (still doesn't really). The best workaround I could find on the net was to temporarily change the application to run in the application pool of the central admin site.</p>
<p>Steps:</p>
<ol>
<li>Change the AppPool for the app to be the same as the Central Admin site (Home Directory tab in IIS website properties).</li>
<li>Reset IIS or at the very least do an %systemroot%\system32\iisapp.vbs /a "apppoolname" /r (not sure if the iisapp.vbs method will work but cant see why not).</li>
<li>Activate the publishing infrastructure.</li>
<li>Set the app pool back to normal.</li>
<li>repeat step 2.</li>
</ol>
<p>Enjoy!</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/error' rel='tag' target='_self'>error</a>, <a class='technorati-link' href='http://technorati.com/tag/IIS' rel='tag' target='_self'>IIS</a>, <a class='technorati-link' href='http://technorati.com/tag/Security' rel='tag' target='_self'>Security</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/07/26/access-denied-enabling-publishing-features-in-sharepoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

