<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Blog @ it-notebook.org</title>
    <link>http://www.it-notebook.org</link>
    <description>RSS-feed for www.it-notebook.org. Mostly IIS, SQL Server and related.</description>
    <copyright>Copyright 2006 - 2011, Kristofer Gafvert</copyright>
    <managingEditor> (Kristofer Gafvert)</managingEditor>
    <pubDate>Fri, 18 Feb 2011 13:20:00 +0100</pubDate>
    <lastBuildDate>Fri, 18 Feb 2011 13:20:00 +0100</lastBuildDate>
    <ttl>1440</ttl>
	<item>
       <title>IIS: No HTTP headers when omitting HTTP version</title>
       <link>http://www.it-notebook.org/iis/article/http_no_headers.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/iis/article/http_no_headers.htm</guid>
       <description>
       <![CDATA[		
<h3>Introduction</h3>
<p>
When working with raw HTTP, you may notice that sometimes no HTTP headers are returned. This depends on the GET header received from the client.
</p>
<p>
...
</p>
<p>
<a href="http://www.it-notebook.org/iis/article/http_no_headers.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Fri, 18 Feb 2011 13:20:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>IIS</category>	 
    </item>
	<item>
       <title>IIS: How to prevent hotlinking using URL Rewrite</title>
       <link>http://www.it-notebook.org/iis/article/prevent_hotlinking_url_rewrite.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/iis/article/prevent_hotlinking_url_rewrite.htm</guid>
       <description>
       <![CDATA[		
<h3>Introduction</h3>
<p>
When a website references images that is not located on the web server where the website is hosted, but instead located on another server (other website), it is called hotlinking (other common names include inline linking, direct linking and leeching). Hotlinking may be legitimate in some situations, for example large websites hosting images on another server then the website (images.website.com, instead of www.website.com). This article will however discuss the situation where hotlinking is unwanted, and "steals" bandwidth from your server. The technique used is to look at the referrer header, to find out if the request for the image comes from your own website, or another website.
</p>
<p>
The first thing you need to do is <a href="http://www.iis.net/download/URLRewrite" target="_blank">install URL Rewrite</a> from <a href="http://www.iis.net" target="_blank">www.iis.net</a>. 
</p>
<p>
...
</p>
<p>
<a href="http://www.it-notebook.org/iis/article/prevent_hotlinking_url_rewrite.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Wed, 04 Aug 2010 13:20:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>IIS</category>	 
    </item>
	<item>
       <title>IIS: International Domain Names in IIS 7</title>
       <link>http://www.it-notebook.org/iis/article/idn_domain_names_iis7.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/iis/article/idn_domain_names_iis7.htm</guid>
       <description>
       <![CDATA[		
<h3>Introduction</h3>
<p>
DNS (when writing this) has no support for non-ASCII characters. Many people do however want to use international domain names using non-ASCII characters (for example Swedish characters &aring;&auml;&ouml;). To overcome this problem and support non-ASCII characters, <a href="http://www.ietf.org/rfc/rfc3490.txt" target="_blank">RFC 3490 "Internationalizing Domain Names in Applications (IDNA)"</a> was developed. In short, this means that support for non-ASCII characters are added by encoding the non-ASCII domain name to a domain name consisting of only ASCII characters. This encoding is explained in <a href="http://www.ietf.org/rfc/rfc3492.txt" target="_blank">RFC 3492 "Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)"</a>.
</p>
<h3>How the encoding is working</h3>
<p>
In order to understand
</p>
<p>
...
</p>
<p>
<a href="http://www.it-notebook.org/iis/article/idn_domain_names_iis7.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Wed, 04 Aug 2010 09:50:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>IIS</category>	 
    </item>
	<item>
       <title>IIS: Should I remove the Server header?</title>
       <link>http://www.it-notebook.org/iis/article/mask_server_header.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/iis/article/mask_server_header.htm</guid>
       <description>
       <![CDATA[		
<p>
When IIS responds to a request, it does not only send the actual data, it also sends response headers. These looks something like the following:
</p>
<p>
Something that has been up for discussion many times is the Server header. Some claims that revealing the server software/version is a security risk. They say that it is possible to target an attack for that specific server.
</p>
<p>
...
</p>
<p>
<a href="http://www.it-notebook.org/iis/article/mask_server_header.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Mon, 02 Aug 2010 14:20:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>IIS</category>	 
    </item>
	<item>
       <title>IIS: Test Connection failes with an authorization warning</title>
       <link>http://www.it-notebook.org/iis/article/test_connection_authorization_failed.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/iis/article/test_connection_authorization_failed.htm</guid>
       <description>
       <![CDATA[		
<h3>The problem</h3>
<p>
When you create a new website in IIS 7 and choose to "Test Settings", or when you do this on an existing website, you are prompted with an error. And this happens without you doing anything wrong, you just accepts the default values. The error is:
</p>
<p class="errorMsg">
Cannot verify access to path
</p>
<p class="errorMsg">
The server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, IIS Manager cannot verify whether the built-in account has access. Make sure that the application pool identity has Read access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that <domain>\<computer_name>$ has Read access to the physical path. Then test these settings again.
</p>
<h3>The explanation</h3>
<p>
...
</p>
<p>
<a href="http://www.it-notebook.org/iis/article/test_connection_authorization_failed.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Tue, 27 Jul 2010 13:10:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>IIS</category>	 
    </item>
	<item>
       <title>IIS: Web Deploy, Error: Could not find the drive</title>
       <link>http://www.it-notebook.org/iis/article/migrate_iis_could_not_find_drive.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/iis/article/migrate_iis_could_not_find_drive.htm</guid>
       <description>
       <![CDATA[		
<h3>The scenario</h3>
<p>
Imagine that you are migrating from IIS 6 to IIS 7, and are using the <a href="http://learn.iis.net/page.aspx/346/web-deploy/" target="_blank">Web Deployment tool</a>. Also imagine that you are moving your web site(s) from E:\ (old server) to D:\ (new server). You create the package on the old server, and try to restore the package on the new server. But when doing that, you are faced with the following error message:
</p>

<p class="errorMsg">
Error: Could not find the drive 'E:\'. The drive might not be ready or might not be mapped.
</p>
<h3>The solution</h3>
<p>
...
</p>
<p>
<a href="http://www.it-notebook.org/iis/article/migrate_iis_could_not_find_drive.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Sat, 17 Jul 2010 07:50:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>IIS</category>	 
    </item>
	<item>
       <title>IIS: How to stop a web site using vb-script</title>
       <link>http://www.it-notebook.org/iis/article/vbs_stop_web_site.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/iis/article/vbs_stop_web_site.htm</guid>
       <description>
       <![CDATA[		
<h3>Introduction</h3>
<p>
This example shows you how to stop a web site running on IIS 7, by using vb-script (visual basic). Remember that you need to run the script as a user with permissions to stop the web site, and you also need to have "IIS Management and script Tools" installed, otherwise you will get a 8004100E error message...
</p>
<p>
<a href="http://www.it-notebook.org/iis/article/vbs_stop_web_site.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Sat, 17 Jul 2010 07:10:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>IIS</category>	 
    </item>
	<item>
       <title>IIS: What does sc-status = 200 and sc-win32-status = 64 mean, and why is time-taken large?</title>
       <link>http://www.it-notebook.org/iis/article/scwin32status_64_scstatus_200.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/iis/article/scwin32status_64_scstatus_200.htm</guid>
       <description>
       <![CDATA[		
<h3>Introduction</h3>
<p>
The combination of sc-status (also known as http status code) = 200 and sc-win-32-status = 64, together with a very large time-take, may happen in the following scenarios
</p>
<h3>Scenario 1</h3>
<p>
IIS first gets the request from the client. IIS execute the request without problems, and send back a response. This results in a sc-status code = 200 (but we still don't know if the client has received the response, hence at this moment sc-win32-status is unknown)...
</p>
<p>
<a href="http://www.it-notebook.org/iis/article/scwin32status_64_scstatus_200.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Sat, 17 Jul 2010 06:50:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>IIS</category>	 
    </item>
	<item>
       <title>IIS: How to enable custom error pages locally</title>
       <link>http://www.it-notebook.org/iis/article/enable_custom_error_pages_locally.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/iis/article/enable_custom_error_pages_locally.htm</guid>
       <description>
       <![CDATA[		
<p>
IIS 7 has a quite neat feature when it comes to showing errors in the browser - you can show different responses depending on if the client is local or remote. This feature is new in IIS 7, and was not available in previous versions of IIS.
</p>
<p>
The default setup is to show detailed errors for local requests, and show custom error pages for remote requests. This is in fact a very good setup, because you do not want to expose detailed error messages to remote client for several reasons. The major reasons are security (the less the client knows about your setup, the better), and user experience (the user wants to see something user friendly).
</p>
<p>
<a href="http://www.it-notebook.org/iis/article/enable_custom_error_pages_locally.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Fri, 9 Jul 2010 09:50:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>IIS</category>	 
    </item>
	<item>
       <title>IIS: For a virtual directory, calculate the number of requests and when it was last accessed (C#)</title>
       <link>http://www.it-notebook.org/iis/article/cs_requests_per_folder.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/iis/article/cs_requests_per_folder.htm</guid>
       <description>
       <![CDATA[		
<p>
This example shows you several examples, listed below. It uses the Microsoft.Web.Administration class, which provides all the necessary classes for configuring and administrating IIS 7. It does not do any error checking, which is recommended if used in a production environment.
</p>
<ul>
<li>Use Log Parser 2.2 from C#, on Windows Server 2008</li>
<li>Get a list of websites hosted on a IIS 7 machine, and its properties. Example of properties are website id, the name of the website, where the log file resides.</li>
<li>Get a list of applications on each of the websites</li>
<li>Get a list of Virtual Directories and its properties for each website. Example of properties are the physical path, and the relative path.</li>
</ul>
<p>
<a href="http://www.it-notebook.org/iis/article/cs_requests_per_folder.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Wed, 7 Jul 2010 16:00:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>IIS</category>	 
    </item>
	<item>
       <title>IIS: Enumerate enabled modules for a specific website in C#</title>
       <link>http://www.it-notebook.org/iis/article/cs_enum_modules_iis.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/iis/article/cs_enum_modules_iis.htm</guid>
       <description>
       <![CDATA[		
<p>
This example shows you how to enumerate the enabled modules for a choosen website. It uses the Microsoft.Web.Administration class, which provides all the necessary classes for configuring and administrating IIS 7.
</p>

<p>
For additional information, see comments inline, and the System.Web.Administration reference (link at the bottom).
</p>
<p>
<a href="http://www.it-notebook.org/iis/article/cs_enum_modules_iis.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Tue, 6 Jul 2010 20:00:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>IIS</category>	 
    </item>
	<item>
       <title>IIS: Change domain name, redirect all content and keep search engine ranking (and visitors)</title>
       <link>http://www.it-notebook.org/iis/article/change_domain_redirect_custom_404.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/iis/article/change_domain_redirect_custom_404.htm</guid>
       <description>
       <![CDATA[		
<p>
I recently moved to a new domain name. This has three major drawbacks:
</p>
<ol>
<li>You will not have any benefit of your rankings for the old website.</li>
<li>You will lose visitors, since they won't find the new website.</li>
<li>You may even be penalized in ranking, because the content on the new website will be a copy of something that already exists on the web.</li>
</ol>
<p>
In this article, I will explain what I did to defeat the drawbacks listed above, by using a custom 404 error page, which looks up the requested URL and maps it to the new URL at the new domain, and redirect the user to the new location.
</p>
<p>
<a href="http://www.it-notebook.org/iis/article/change_domain_redirect_custom_404.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Tue, 6 Jul 2010 12:30:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>IIS</category>	 
    </item>
	<item>
       <title>SQL Server: How null values work</title>
       <link>http://www.it-notebook.org/sqlserver/article/how_null_works.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/sqlserver/article/how_null_works.htm</guid>
       <description>
       <![CDATA[		
<p>
A NULL value means that the value is unknown. It does not mean that the value is empty or zero. This also means that two null values are the same and a comparison between two null values returns UNKNOWN (neither true nor false). So "age = null" would return neither TRUE nor FALSE if age would be null.
</p>
<p>
<a href="http://www.it-notebook.org/sqlserver/article/how_null_works.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Wed, 14 Oct 2009 19:30:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>SQL Server</category>	 
    </item>
	<item>
       <title>SQL Server: How to...search for NULL values</title>
       <link>http://www.it-notebook.org/sqlserver/article/howto_check_null.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/sqlserver/article/howto_check_null.htm</guid>
       <description>
       <![CDATA[		
<p>
A null value means that the data is unknown. It does not mean that the value is blank or zero and two null values are not equal. Because of this, we need to use a special operator to work with NULL values, called the "IS" operator.A NULL value means that the value is unknown. It does not mean that the value is empty or zero. This also means that two null values are the same and a comparison between two null values returns UNKNOWN (neither true nor false). So "age = null" would return neither TRUE nor FALSE if age would be null.
</p>
<p>
<a href="http://www.it-notebook.org/sqlserver/article/howto_check_null.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Tue, 13 Oct 2009 19:30:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>SQL Server</category>	 
    </item> 
	<item>
       <title>SQL Server: How to...retrieve data based on several conditions</title>
       <link>http://www.it-notebook.org/sqlserver/article/howto_retrieve_several_condition.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/sqlserver/article/howto_retrieve_several_condition.htm</guid>
       <description>
       <![CDATA[		
<p>
Usually when you want to see data from a table, you do not want all data, but instead data that satisfy a criteria. The following example retrieves addresses from the Person.Address table in the AdventureWorks sample database, where the city is "Bothell". 
</p>
<p>
<a href="http://www.it-notebook.org/sqlserver/article/howto_retrieve_several_condition.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Tue, 13 Oct 2009 19:30:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>SQL Server</category>	 
    </item> 
	<item>
       <title>SQL Server: How to...retrieve data based on one condition</title>
       <link>http://www.it-notebook.org/sqlserver/article/howto_retrieve_one_condition.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/sqlserver/article/howto_retrieve_one_condition.htm</guid>
       <description>
       <![CDATA[		
<p>
Usually when you want to see data from a table, you do not want all data, but instead data that satisfy a criteria. The following example retrieves addresses from the Person.Address table in the AdventureWorks sample database, where the city is "Bothell". 
</p>
<p>
<a href="http://www.it-notebook.org/sqlserver/article/howto_retrieve_one_condition.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Sun, 11 Oct 2009 19:30:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>SQL Server</category>	 
    </item>
	<item>
       <title>SQL Server: How to...retrieve all data from a table</title>
       <link>http://www.it-notebook.org/sqlserver/article/howto_retrieve_all.htm</link>
       <guid isPermaLink="true">http://www.it-notebook.org/sqlserver/article/howto_retrieve_all.htm</guid>
       <description>
       <![CDATA[		
<p>
If you want to see all columns in a table, you can do the following: 
</p>
<p>
<a href="http://www.it-notebook.org/sqlserver/article/howto_retrieve_all.htm">Continue...</a>
</p>
       ]]>
       </description>
       <author> (Kristofer Gafvert)</author>
       <pubDate>Fri, 9 Oct 2009 19:30:00 +0100</pubDate>
       <source url="http://www.it-notebook.org/rss.xml">Blog @ it-notebook.org</source>       
	   <category>SQL Server</category>	 
    </item>
  </channel>
</rss>
