<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>IIS ve ASP.NET Notları</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/cenkiscan/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/cenkiscan/feed.xml</link>
    <description>IIS ve ASP.NET üzerine denemeler</description>
    <lastBuildDate>Tue, 16 Apr 2019 04:52:22 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>IIS Best Practices</title>
      <link>https://docs.microsoft.com/archive/blogs/cenkiscan/iis-best-practices</link>
      <pubDate>Wed, 20 Jun 2012 06:54:19 GMT</pubDate>
      <dc:creator><![CDATA[CenkIscan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/cenkiscan/2012/06/20/iis-best-practices/</guid>
      <description><![CDATA[For a very long time, I have been asked for a document on IIS best practices. There are some...]]></description>
      <content:encoded><![CDATA[<p>For a very long time, I have been asked for a document on IIS best practices. There are some blogs/articles on the Internet but I could not find a complete one. Actually, the main problem here is that there can not be “best practices” for a web server. A web server is just a hosting platform for applications, and, each and every application has its own needs. Therefore, in many cases, you will not have one universal best practice.</p>  <p>Having these said, I tried to gather a list of things one should check while configuring an IIS server (and an application on IIS). I should say that these are my own thoughts based on my own experience. It is very likely that you will find some resources mentioning just the opposite of what I say.</p>  <p><strong>NOTE:</strong> Some of the links I provided below refer to content in Turkish because I usually blog in Turkish.</p>  <p><strong>Application pool configuration</strong></p>  <ul>   <li>Create one application pool for each application. You might consider grouping applications to pools if there are too many applications and/or sites hosted, for administration and management purposes.</li>    <li>Use Integrated mode whenever possible (IIS 7.x)      <br />&#160;&#160; How to Take Advantage of the IIS 7.0 Integrated Pipeline&#160; <br />&#160;&#160; <a href="http://learn.iis.net/page.aspx/244/how-to-take-advantage-of-the-iis-integrated-pipeline/" target="_blank">http://learn.iis.net/page.aspx/244/how-to-take-advantage-of-the-iis-integrated-pipeline/</a></li>    <li>Use 32bit application pools whenever possible (on x64 servers, if total memory usage permits)      <br />&#160;&#160; 32-bit Mode Worker Processes&#160; <br />&#160;&#160; <a href="http://learn.iis.net/page.aspx/201/32-bit-mode-worker-processes/" target="_blank">http://learn.iis.net/page.aspx/201/32-bit-mode-worker-processes/</a></li>    <li>Use ApplicationPoolIdentity as identity      <br />&#160;&#160; Application Pool Identities       <br />&#160;&#160; <a href="http://learn.iis.net/page.aspx/624/application-pool-identities/" target="_blank">http://learn.iis.net/page.aspx/624/application-pool-identities/</a></li>    <li>Do not leave recycling configuration as default:</li>    <ul>     <li>Idle Time-out (minutes): 0 (set to zero)</li>      <li>Regular time interval (minutes): 0 (set to zero)</li>      <li>Specific Times: Set to least used time of the day        <br />Recycling Settings for an Application Pool &lt;recycling&gt;         <br /><a href="http://www.iis.net/ConfigReference/system.applicationHost/applicationPools/add/recycling" target="_blank">http://www.iis.net/ConfigReference/system.applicationHost/applicationPools/add/recycling</a></li>   </ul>    <li>Set all &quot;Generate Recycle Event Log Entry&quot; fields to true      <br />&#160;&#160; IIS 7.0 - Application Pool Recycles - Log a event in Windows Event Log       <br />&#160;&#160; <a href="http://blogs.iis.net/ganekar/archive/2008/12/12/iis-7-0-application-pool-recycles-log-a-event-in-windows-event-log.aspx" target="_blank">http://blogs.iis.net/ganekar/archive/2008/12/12/iis-7-0-application-pool-recycles-log-a-event-in-windows-event-log.aspx</a></li>    <li>Do not set any memory limit unless troubleshooting specific scenarios </li>    <li>Consider increasing &quot;Maximum Worker Processes&quot; (web gardening) number - with caution - if </li>    <ul>     <li>Your application is sessionless or uses &quot;out-of-process&quot; session state </li>      <li>And it does not cache too much data (as it would be cached in each process which would then cause performance degradation) </li>   </ul>    <li>Configure &quot;Rapid-fail protection&quot; as per your needs and environment (consider &quot;maximum worker processes&quot; setting as well):      <br />&#160;&#160; Configuring Rapid-Fail Protection (applies both to IIS 6.0 and 7.x)       <br />&#160;&#160; <a href="http://technet.microsoft.com/en-us/library/cc787273(v=WS.10).aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">http://technet.microsoft.com/en-us/library/cc787273(v=WS.10).aspx</a>      <br />      <br />&#160;&#160; Service unavailable       <br />&#160;&#160; <a href="http://blogs.msdn.com/b/cenkiscan/archive/2009/01/14/service-unavailable.aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">http://blogs.msdn.com/b/cenkiscan/archive/2009/01/14/service-unavailable.aspx</a>&#160;&#160;&#160; </li> </ul>  <p>   <br /><strong>Logging</strong></p>  <ul>   <li>Do not turn logging off</li>    <li>Turn on as many fields as possible (at least defaults + sc-bytes and cs-bytes on IIS 7.x)</li>    <li>Monitor disk usage as the logs might grow quite fast</li>    <li>Schedule scripts to archive older logs</li>    <li>Use &quot;Advanced Logging&quot; module if you need to log extra fields. If you have an NLB&#160; device which NATs (causing the client IP to be hidden from IIS servers), consider using both default logs and &quot;advanced logs&quot;:      <br />&#160;&#160; Advanced Logging       <br />&#160;&#160; <a title="http://www.iis.net/download/AdvancedLogging" href="http://www.iis.net/download/AdvancedLogging" target="_blank">http://www.iis.net/download/AdvancedLogging</a>      <br />      <br />&#160;&#160; İstemci IP adresleri      <br />&#160;&#160; <a title="http://blogs.msdn.com/b/cenkiscan/archive/2011/02/03/istemci-ip-adresleri.aspx" href="http://blogs.msdn.com/b/cenkiscan/archive/2011/02/03/istemci-ip-adresleri.aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">http://blogs.msdn.com/b/cenkiscan/archive/2011/02/03/istemci-ip-adresleri.aspx</a>      <br />      <br />&#160;&#160; Using the X-Forwarded-For HTTP header to preserve the original client IP address for traffic translated by a SNAT       <br />&#160;&#160; <a title="http://support.f5.com/kb/en-us/solutions/public/4000/800/sol4816.html" href="http://support.f5.com/kb/en-us/solutions/public/4000/800/sol4816.html" target="_blank">http://support.f5.com/kb/en-us/solutions/public/4000/800/sol4816.html</a>      <br />      <br />&#160;&#160; How to Rewrite HTTP Headers With Client IP       <br />&#160;&#160; <a title="http://support.citrix.com/article/ctx109599" href="http://support.citrix.com/article/ctx109599" target="_blank">http://support.citrix.com/article/ctx109599</a></li> </ul>  <p><strong>Content</strong></p>  <ul>   <li>Configure static and dynamic compression - if CPU usage and content types permit      <br />&#160;&#160; HTTP Compression &lt;httpCompression&gt;       <br />&#160;&#160; <a title="https://www.iis.net/ConfigReference/system.webServer/httpCompression?showTreeNavigation=true" href="https://www.iis.net/ConfigReference/system.webServer/httpCompression?showTreeNavigation=true" target="_blank">https://www.iis.net/ConfigReference/system.webServer/httpCompression?showTreeNavigation=true</a></li>    <li>Configure antivirus applications to exclude:</li>    <ul>     <li>Content folders</li>      <li>Temporary ASP.NET Files folder (C:\Windows\Framework[64]\vX.X.XXXXX\)</li>      <li>Any temp folder if used</li>   </ul>    <li>Use &quot;Output caching&quot; whenever possible (be careful doing this as this might cause users to access each other's sessions)      <br />&#160;&#160; Configure IIS 7 Output Caching       <br />&#160;&#160; <a title="http://learn.iis.net/page.aspx/710/configure-iis-7-output-caching/" href="http://learn.iis.net/page.aspx/710/configure-iis-7-output-caching/" target="_blank">http://learn.iis.net/page.aspx/710/configure-iis-7-output-caching/</a>      <br />      <br />&#160;&#160; An ASP.NET page is stored in the HTTP.sys kernel cache in IIS 6.0 when the ASP.NET page generates an HTTP header that contains a Set-Cookie response       <br />&#160;&#160; <a title="http://support.microsoft.com/kb/917072" href="http://support.microsoft.com/kb/917072?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">http://support.microsoft.com/kb/917072</a></li>    <li>Remove any unused &quot;default document&quot; setting and keep only the one you will use      <br />&#160;&#160; Default Document &lt;defaultDocument&gt;       <br />&#160;&#160; <a title="http://www.iis.net/ConfigReference/system.webServer/defaultDocument" href="http://www.iis.net/ConfigReference/system.webServer/defaultDocument" target="_blank">http://www.iis.net/ConfigReference/system.webServer/defaultDocument</a></li> </ul>  <p><strong>Security</strong></p>  <ul>   <li>Configure &quot;Request Filtering&quot;:</li>    <ul>     <li>“Allow unlisted file name extensions&quot;: Uncheck (add only the extensions you will use) </li>      <li>“Allow unlisted verbs&quot;: Uncheck (add only the verbs you will use)&#160; </li>      <li>Lower &quot;request limits&quot; if possible</li>   </ul>    <li>Remove HTTP headers which identifies the server and application. These headers are believed to cause security vulnerability:      <br />&#160;&#160; Server ve ASP.NET başlıkları      <br />&#160;&#160; <a title="http://blogs.msdn.com/b/cenkiscan/archive/2012/01/30/server-ve-asp-net-ba-l-klar.aspx" href="http://blogs.msdn.com/b/cenkiscan/archive/2012/01/30/server-ve-asp-net-ba-l-klar.aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">http://blogs.msdn.com/b/cenkiscan/archive/2012/01/30/server-ve-asp-net-ba-l-klar.aspx</a></li>    <li>Set NTLM permissions on the content folders as needed; do not give unnecessary permissions to unnecessary users. You should consider authentication and impersonation configurations to do this.</li>    <li>Remove any unused modules to reduce attack surface. For example, if you do not&#160; specifically need WebDAV, do not install it.</li> </ul>  <p><strong>Other</strong></p>  <ul>   <li>For ASP applications, do not ever enable &quot;server-side debugging&quot;      <br />&#160;&#160; PRB: IIS May Hang If You Enable ASP Server-Side Script Debugging       <br />&#160;&#160; <a title="http://support.microsoft.com/kb/312941" href="http://support.microsoft.com/kb/312941?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">http://support.microsoft.com/kb/312941</a></li>    <li>For ASP.NET applications, confirm that they are built in release mode, and that they do not have debug=&quot;true&quot; in any web.config file in production      <br />&#160;&#160; &lt;compilation debug=&quot;true&quot; /&gt;       <br />&#160;&#160; <a title="http://blogs.msdn.com/b/cenkiscan/archive/2007/11/27/compilation-debug-true.aspx" href="http://blogs.msdn.com/b/cenkiscan/archive/2007/11/27/compilation-debug-true.aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">http://blogs.msdn.com/b/cenkiscan/archive/2007/11/27/compilation-debug-true.aspx</a>      <br />      <br />&#160;&#160; ASP.NET Memory: If your application is in production… then why is debug=true       <br />&#160;&#160; <a title="http://blogs.msdn.com/b/tess/archive/2006/04/13/asp-net-memory-if-your-application-is-in-production-then-why-is-debug-true.aspx" href="http://blogs.msdn.com/b/tess/archive/2006/04/13/asp-net-memory-if-your-application-is-in-production-then-why-is-debug-true.aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">http://blogs.msdn.com/b/tess/archive/2006/04/13/asp-net-memory-if-your-application-is-in-production-then-why-is-debug-true.aspx</a>      <br />      <br />&#160;&#160; Don’t run production ASP.NET Applications with debug=”true” enabled       <br />&#160;&#160; <a title="http://weblogs.asp.net/scottgu/archive/2006/04/11/442448.aspx" href="http://weblogs.asp.net/scottgu/archive/2006/04/11/442448.aspx" target="_blank">http://weblogs.asp.net/scottgu/archive/2006/04/11/442448.aspx</a></li>    <li>Make sure tracing is disabled at both application and IIS level (Failed Request Tracing)</li>    <li>Set the applications' timeout values as low as technically possible      <br />&#160;&#160; Set Timeouts Aggressively       <br />&#160;&#160; <a title="http://msdn.microsoft.com/en-us/library/ff647787.aspx" href="http://msdn.microsoft.com/en-us/library/ff647787.aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">http://msdn.microsoft.com/en-us/library/ff647787.aspx</a></li>    <li>Install/copy these tools on the server as you never know when you will need them      <br />&#160;&#160; Debug Diagnostic Tool v1.2       <br />&#160;&#160; <a title="http://www.microsoft.com/en-us/download/details.aspx?id=26798" href="http://www.microsoft.com/en-us/download/details.aspx?id=26798" target="_blank">http://www.microsoft.com/en-us/download/details.aspx?id=26798</a>      <br />      <br />&#160;&#160; ProcDump v4.01       <br />&#160;&#160; <a title="http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx" href="http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx</a></li>    <li>Save the performance counters one should monitor in case of an issue to the desktop or somewhere. The following might be a starting point for ASP.NET applications:     <br />&#160;&#160; \Processor(_Total)\*       <br />&#160;&#160; \.NET CLR Exceptions(*)\# of Exceps Thrown / sec       <br />&#160;&#160; \.NET CLR Memory(*)\# Gen 0 Collections       <br />&#160;&#160; \.NET CLR Memory(*)\# Gen 1 Collections       <br />&#160;&#160; \.NET CLR Memory(*)\# Gen 2 Collections       <br />&#160;&#160; \.NET CLR Memory(*)\# Induced GC       <br />&#160;&#160; \.NET CLR Memory(*)\Process ID       <br />&#160;&#160; \.NET CLR Memory\#Bytes In All Heaps&#160; <br />&#160;&#160; \.NET CLR Memory\%Time in GC       <br />&#160;&#160; \ASP.NET\Application Restarts       <br />&#160;&#160; \ASP.NET\Request Execution Time       <br />&#160;&#160; \ASP.NET\Requests Current       <br />&#160;&#160; \ASP.NET\Requests Queued       <br />&#160;&#160; \ASP.NET\Worker Process Restarts       <br />&#160;&#160; \ASP.NET Applications(*)\Requests/Sec       <br />&#160;&#160; \Memory\Available MBytes      <br />&#160;&#160; \Process(*)\% Processor Time       <br />&#160;&#160; \Process(*)\ID Process       <br />&#160;&#160; \Process(*)\Private Bytes</li> </ul>  <p>&#160;</p>  <p>CENK ISCAN</p>]]></content:encoded>
    </item>
    <item>
      <title>Server ve ASP.NET başlıkları</title>
      <link>https://docs.microsoft.com/archive/blogs/cenkiscan/server-ve-asp-net-balklar</link>
      <pubDate>Mon, 30 Jan 2012 01:39:34 GMT</pubDate>
      <dc:creator><![CDATA[CenkIscan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/cenkiscan/2012/01/30/server-ve-asp-net-balklar/</guid>
      <description><![CDATA[IIS sunucuları, gelen istekleri yanıtlarken HTTP başlık (header) bölümünde kendileriyle ilgili bazı...]]></description>
      <content:encoded><![CDATA[<p>IIS sunucuları, gelen istekleri yanıtlarken HTTP başlık (header) bölümünde kendileriyle ilgili bazı bilgiler sunar:</p> <blockquote> <p><font face="Courier New">HTTP/1.1 200 OK<br>Cache-Control: private<br>Content-Type: text/html; charset=utf-8<br><strong><u>Server: Microsoft-IIS/7.5<br>X-AspNet-Version: 2.0.50727</u></strong><br><strong><u>X-Powered-By: ASP.NET<br></u></strong>Set-Cookie: ASP.NET_SessionId=awfthz48bftycdu3f7lpkku1; path=/; HttpOnly<br>Date: Mon, 30 Jan 2012 08:41:49 GMT<br>Content-Length: 5975</font></p></blockquote> <p>Yukarıdaki altı çizili üç başlığın, uygulamanın veya sunucunun çalışmasına direkt bir etkisi yoktur, dolayısıyla bunları engelleyebiliriz. Nitekim, pek çok güvenlik taramasında bu başlıklların bulunması potansiyel güvenlik açığı olarak nitelendirilir.Bunun gerekçesi, potansiyel bir saldırgana uygulama ortamı ve versiyonu bilgisi sunmasının, saldırganın işini kolaylaştıracak olmasıdır.</p> <p>Bunları engellemek oldukça kolaydır:</p> <ul> <li><strong>Server: IIS/6.0:</strong> Bunun için sunucuya UrlScan kurulup, urlscan.ini dosyasında DisableServerHeader = 1 şeklinde bir ayar tanımlanmalıdır. Ancak, UrlScan default olarak bazı kısıtlamalar getireceğinden tüm ayarların üzerinden geçmekte fayda olacaktır.  <li><strong>Server: IIS/7.x:</strong> Bunun için sunucuya url rewrite modülü kurulup aşağıdaki ayarın yapılmasi gerekiyor:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;rewrite&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;outboundRules&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;rule name="replace server header" patternSyntax="Wildcard"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;match serverVariable="RESPONSE_SERVER" pattern="*" /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action type="Rewrite" value="MyServer" /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/rule&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/outboundRules&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/rewrite&gt;<br>Yukarıdaki ayar, "Server" başlığını kaldırmayıp değerini "MyServer" olarak değiştirecektir.  <li><strong>X-Powered-By: ASP.NET:</strong> Bu header'ı kaldırmak için IIS'in arayüzünde "HTTP Response Headers"tan silmek yeterlidir.  <li><strong>X-AspNet-Version: 2.0.50727:</strong> Bu header'ı ASP.NET eklediği için bunu .NET Framework'ün machine.config dosyasına asağıdaki ayarı ekleyin:<br>&lt;httpRuntime enableVersionHeader="false" /&gt; </li></ul> <p>Kaynaklar:</p> <p><a href="http://www.iis.net/download/URLRewrite" target="_blank">URL Rewrite</a><br><a href="http://technet.microsoft.com/en-us/library/cc753686(WS.10).aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">HTTP Response Headers (IIS 7)</a><br><a href="http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.enableversionheader.aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">HttpRuntimeSection.EnableVersionHeader Property</a> <br></p> <p><strong>CENK</strong></p>]]></content:encoded>
    </item>
    <item>
      <title>401 Unauthorized</title>
      <link>https://docs.microsoft.com/archive/blogs/cenkiscan/401-unauthorized</link>
      <pubDate>Tue, 13 Sep 2011 07:07:00 GMT</pubDate>
      <dc:creator><![CDATA[CenkIscan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/cenkiscan/2011/09/13/401-unauthorized/</guid>
      <description><![CDATA[Daha &ouml;nce de kimlik doğrulama ile ilgili bir yazı yazmıştım. Orada detaylı olarak bahsettiğim...]]></description>
      <content:encoded><![CDATA[<p>Daha &ouml;nce de kimlik doğrulama ile ilgili bir yazı yazmıştım. Orada detaylı olarak bahsettiğim gibi, 401 hataları kimlik doğrulama işleminin normal bir par&ccedil;asıdır. Ancak bazen, her şeyi doğru yaptığımız halde tarayıcı bize kullanıcı adı/şifre sorar ve buna rağmen giriş yapamayız ve 401.1 "Logon failed" hatası alırız.</p>
<p>Bu t&uuml;r bir sorunun ilk akla gelen nedeni, elbette kullanıcı adı veya şifrenin yanlış olmasıdır. Eğer yetki sorunumuz olsa 401.3 "Unauthorized due to ACL on resource" veya bazı durumlarda da 403 hataları alırdık. Ama kullanıcı adımız ve şifremiz doğru olsa bile 401.1 alabileceğimiz bir senaryo var: Kerberos.</p>
<p>IIS 6.0 (Windows 2003 SP1 sonrası) ve 7.x versiyonlarında "integrated windows authentication" kullandığımızda kullanıcıya hem NTLM hem de Negotiate se&ccedil;enekleri sunulur. Kullanıcı - aslında tarayıcı - bunlardan duruma g&ouml;re birini se&ccedil;er. Tarayıcının ilk tercihi - Intranet uygulamalarında - Negotiate/Kerberos kullanmak y&ouml;n&uuml;ndedir. Aslında IIS de Kerberos kullanımını default olarak destekler. Ancak burada k&uuml;&ccedil;&uuml;k bir sorun vardır: NTLM kullanmak i&ccedil;in hi&ccedil;bir ekstra ayara gerek olmazken, Kerberos i&ccedil;in Domain Controller &uuml;zerinde bazı ayarların yapılması gerekmektedir. Bu ayarları yapmadıysak, kullanıcıdan gelecek olan Kerberos bileti IIS'e hi&ccedil;bir şey ifade etmeyecek ve 401.1 hatası d&ouml;necektir.</p>
<p>Bu t&uuml;r bir problemle karşılaştığımızda, sorunun Kerberos olup olmadığını anlamanın &ccedil;ok basit bir yolu vardır: Internet Explorer'da aşağıdaki se&ccedil;eneği kaldırmak:</p>
<p>Tools -&gt; Internet Options-&gt; Advanced -&gt; Enable Integrated Windows Authentication</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/2781.image_2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-61-metablogapi/2781.image_5F00_2.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/7140.image_thumb.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-94-61-metablogapi/7140.image_5F00_thumb.png" width="405" height="511" /></a></p>
<p>İsim biraz yanıltıcı olsa da bunu kaldırmak aslında sadece Kerberos kullanımını engeller, NTLM kullanılmasını sağlar. Eğer bu şekilde bir istekte bulunduğunuzda sorunsuz giriş yapabiliyorsanız, o zaman sorun kesin olarak Kerberos ayarlarındadır.</p>
<p><strong>NOT 1:</strong> Bu ayarı değiştirdikten sonra IE'yi kapatıp yeniden a&ccedil;mak gerekecektir.</p>
<p><strong>NOT 2:</strong> Kerberos ayarları ve sorun &ccedil;&ouml;z&uuml;mleri i&ccedil;in aşağıdaki makalelerden yararlanabilirsiniz:</p>
<p><a href="http://support.microsoft.com/kb/907272?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">Kerberos authentication and troubleshooting delegation issues</a>&nbsp;</p>
<p><a href="http://support.microsoft.com/kb/326985?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">How to troubleshoot Kerberos-related issues in IIS</a></p>
<p>CENK İŞCAN</p>]]></content:encoded>
    </item>
    <item>
      <title>404 Dosya Bulunamadı</title>
      <link>https://docs.microsoft.com/archive/blogs/cenkiscan/404-dosya-bulunamad</link>
      <pubDate>Tue, 23 Aug 2011 05:58:01 GMT</pubDate>
      <dc:creator><![CDATA[CenkIscan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/cenkiscan/2011/08/23/404-dosya-bulunamad/</guid>
      <description><![CDATA["404 Dosya bulunamadı" hatasının nedeni aslında çok açık görünüyor: "Dosya bulunamadı". Ancak işin...]]></description>
      <content:encoded><![CDATA[<p>"404 Dosya bulunamadı" hatasının nedeni aslında çok açık görünüyor: "Dosya bulunamadı". Ancak işin aslı tam olarak öyle değil.</p> <p>IIS, ve bazı başka web sunucular, güvenlik nedeniyle bir isteği blokladıklarında, yine güvenlik nedeniyle neden bloklandığını son kullanıcıya söylemezler. Bunun yerine "404 Dosya bulunamadı" hatası dönerler. Bazı senaryolarda IIS içeriğin gerçekte var olup olmadığına bile bakmadan bu hatayı döner.</p> <p>Önce bu "bazı senaryolar"ın ne olduğundan biraz bahsedelim. IIS'e ait olan sürücü (driver) http.sys ve IIS 7.x ile gelen "Request Filtering" modülü, gelen her isteği işlenmeden önce bir takım güvenlik kontrollerinde geçirirler. Bu kontrollerden bazıları:</p> <ul> <li>İstenilen dosyanın uzantısı </li> <li>İstekte bulunulan metot (verb)</li> <li>İstek verisinin ebatı</li> <li>URL uzunluğu</li></ul> <p>Tüm bunlar için tanımlı değerlerin dışında bir istek geldiği takdirde istemciye 404 hatası dönülecektir. Ancak elbette bir site yöneticisinin bunları ayırt edebiliyor olması lazımdır. İşte bunu da IIS loglarında hata alt-kodları ile yapabiliyoruz:</p> <ul> <li>404.0 - Not found.  <li>404.1 - Site Not Found.  <li>404.2 - ISAPI or CGI restriction.  <li>404.3 - MIME type restriction.  <li>404.4 - No handler configured.  <li>404.5 - Denied by request filtering configuration.  <li>404.6 - Verb denied.  <li>404.7 - File extension denied.  <li>404.8 - Hidden namespace.  <li>404.9 - File attribute hidden.  <li>404.10 - Request header too long.  <li>404.11 - Request contains double escape sequence.  <li>404.12 - Request contains high-bit characters.  <li>404.13 - Content length too large.  <li>404.14 - Request URL too long.  <li>404.15 - Query string too long.  <li>404.16 - DAV request sent to the static file handler.  <li>404.17 - Dynamic content mapped to the static file handler via a wildcard MIME mapping.  <li>404.18 - Querystring sequence denied.  <li>404.19 - Denied by filtering rule.</li></li></li></li></li></li></li></li></li></li></li></li></li></li></li></li></li></li></li></li></ul> <p>IIS 7.x sunucuların tüm hata kodlarının listesine <a href="http://support.microsoft.com/kb/943891?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">şuradan</a> ulaşabilirsiniz. </p> <p>CENK İŞCAN</p>]]></content:encoded>
    </item>
    <item>
      <title>System.InvalidOperationException</title>
      <link>https://docs.microsoft.com/archive/blogs/cenkiscan/system-invalidoperationexception</link>
      <pubDate>Tue, 16 Aug 2011 04:21:00 GMT</pubDate>
      <dc:creator><![CDATA[CenkIscan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/cenkiscan/2011/08/16/system-invalidoperationexception/</guid>
      <description><![CDATA[Uzunca bir s&uuml;redir hakkında yazmak istediğim bir "exception"dı bu, ancak hen&uuml;z fırsat...]]></description>
      <content:encoded><![CDATA[<p>Uzunca bir s&uuml;redir hakkında yazmak istediğim bir "exception"dı bu, ancak hen&uuml;z fırsat bulabildim. Tam hata mesajımız şu şekildedir:</p>
<blockquote>
<p>System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool.</p>
<p>This may have occurred because all pooled connections were in use and max pool size was reached.</p>
</blockquote>
<p>Aslında hata mesajı yeterince a&ccedil;ık ama "InvalidOperationException" tabiri biraz yanıltıcı olabiliyor. Hatanın nedeni &ccedil;ok net: havuzda bağlantı kalmamış.</p>
<p>Veritabanı bağlantılarında (ister SQL Server olsun, ister Oracle veya başka bir veritabanı), genel olarak bir bağlantı havuzu kullanılır; veritabanına her istek i&ccedil;in yeniden bağlantı a&ccedil;ılıp kapatılmaz. Bu havuzun da bir kapasitesi vardır. &Ouml;rneğin SQL Server i&ccedil;in bunun &ouml;n tanımlı değeri 100'd&uuml;r (<a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(VS.80).aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">max pool size</a> değeri). Yani havuzda herhangi bir anda en fazla 100 adet bağlantı bulunur ve veritabanına gidecek t&uuml;m işler bu havuzdan bir bağlantı alıp, veritabanı işini yapıp, sonra tekrar havuza bırakırlar.</p>
<p>Şimdi bu senaryoda ters gidebilecek bazı şeyler var: İsteklerin gelme hızı veritabanından yanıt alma hızımızda fazla olursa, bir s&uuml;re sonra havuzda bağlantı kalmayacaktır. Bu durumda yeni gelecek olan bir istek 15 saniye boyunca havuza bağlantı d&ouml;nmesini bekler (<a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(VS.80).aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">connect timeout</a> s&uuml;resi kadar). İşte tam da bu s&uuml;re sonunda havuz hala boşsa yukarıdaki exception alınır.</p>
<p><strong>&Ccedil;&Ouml;Z&Uuml;M:</strong></p>
<p>Bu t&uuml;r bir sorun yaşadığımızda bağlantı havuzunun ebatını artırabiliriz. Bağlantı c&uuml;mlesine "max pool size" parametresini ekleyip buna 100'den b&uuml;y&uuml;k bir değer vermek yeterli olacaktır. Ancak bu değeri artırırken, bunun veritabanına eşzamanlı daha fazla istek g&ouml;nderilmesi anlamına geleceğini, yani veritabanındaki y&uuml;k&uuml; artıracağını unutmamak gerekir. Bazı durumlarda bu, veritabanının daha da yavaş yanıt vermesine ve durumun daha da k&ouml;t&uuml;leşmesine neden olabilir.</p>
<p>Veritabanı bağlantılarını kullanırken dikkat etmemiz gereken &ccedil;ok &ouml;nemli bir nokta vardır: İşi biten bağlantı, eğer Close() veya Dispose () metotlarından birini &ccedil;ağırırsak,&nbsp;hemen havuza geri d&ouml;ner. Eğer baglantıyı kapatmayı unutmuşsak, bu durumda bu bağlantı ilk hemen havuza d&ouml;nemez, GC tarafından temizlenmeyi bekler ve havuza d&ouml;nme s&uuml;resi uzar. Bu da, yukarıdaki sorunu yaşama ihtimalimizi kat kat artıracaktır. "Max pool size" değerini 5000 verdiği halde bu hatayı zaman zaman alan uygulamalarla karşılaştım. Bu nedenle daha uygulamayı geliştiriken a&ccedil;ılan her bağlantının mutlaka kapatıldığından emin olmalıyız. Bağlantıyı a&ccedil;tıktan sonra oluşabilecek sorunlara karşı try/catch bloğu kullanıp, <a href="http://msdn.microsoft.com/en-US/library/ms173166(v=VS.80).aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">finally</a> altında bağlantıyı kapatmalıyız. Bir diğer y&ouml;ntem de <a href="http://msdn.microsoft.com/en-us/library/3bwa4xa9(v=VS.80).aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">using</a> kullanmak olacaktır.</p>
<p>&Ouml;zetle, kod geliştiriken g&ouml;z ardı edeceğimiz ufak şeyler, uygulama y&uuml;k altına girince b&uuml;y&uuml;k sorunlar olarak karşımıza &ccedil;ıkabilir. Sadece veritabanı bağlantıları anlamında değil, her t&uuml;rl&uuml; nesneyle işimiz bittiğinde, eğer nesnenin bir "Close()" metodu varsa &ccedil;ağırmalıyız. Ve bunu işimiz biter bitmez yaptığımızdan, ve bunu engelleyecek bir sorun olmayacağından emin olmalıyız.</p>
<p>CENK İŞCAN</p>]]></content:encoded>
    </item>
    <item>
      <title>OutOfMemoryException (OOM)</title>
      <link>https://docs.microsoft.com/archive/blogs/cenkiscan/outofmemoryexception-oom</link>
      <pubDate>Fri, 05 Aug 2011 00:06:18 GMT</pubDate>
      <dc:creator><![CDATA[CenkIscan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/cenkiscan/2011/08/05/outofmemoryexception-oom/</guid>
      <description><![CDATA[Daha önceki bir yazımda .NET ortamındaki uygulamaların hafıza kullanım limitlerinden bahsetmiştim....]]></description>
      <content:encoded><![CDATA[<p>Daha önceki bir yazımda .NET ortamındaki uygulamaların <a href="http://blogs.msdn.com/b/cenkiscan/archive/2008/07/17/haf-za-kullan-m-limitleri.aspx" target="_blank">hafıza kullanım limitleri</a>nden bahsetmiştim. Gün geçtikçe daha çok uygulama 64bit ortamda koşmaya başlıyor, ve bu da yazılımcılara belirli bir rahatlık sağlıyor. Ancak bu rahatlık, bazen istenmeyen sonuçlara neden olabiliyor.</p> <p>Son birkaç ay içerisinde çok sayıda OutOfMemoryException problemi üzerinde çalıştım. Bunlardan çoğu da 64bit sunucu üzerinde 64bit ASP.NET uygulamalarıydı. Böyle bir ortamda aslında OOM almak çok kolay değildir. 64bit bir .NET uygulaması, 64bit sunucuda hafıza kullanımında oldukça yüksek rakamlara çıkabilir:</p> <p>Limit = ( RAM + Page File Ebatı ) * 60%</p> <p>Örneğin 8 GB RAM''e sahip bir sunucuda, page file ebatı da 12 GB ise: </p> <p>Limit = ( 8 + 12 ) 60% = 12 GB</p> <p>Bu kolay ulaşabileceğimiz bir rakam değildir - gerçi ben 35 GB'a ulaşan "worker process"le karşılaştım ama bu kesinlikle istisnaydı.</p> <p>Bahsettiğimiz limitlere ulaşmadan çok önce OOM alınan senaryolarla karşilaştım son dönemde çokça. Bunların nedeni ise, ebatı 2GB olan nesneler olarak karşımıza çıktı. Bu çok fazla bilinmez, çünkü zaten 32bit ortamlarda bu limite ulaşmak imkansızdır, ancak bir .NET uygulaması içerisinde yaratılabilecek nesneler 2GB'tan büyük olamazlar. Eğer bir nedenle uygulamanız içerisinde bu ebatta bir nesne yaratılmaya kalkışılırsa, bunun sonucu da OOM olmaktadır - hafıza kullanım limitlerinden çok uzak olsak da.</p> <p>Limitlere ulaşmadan OOM almanın bir diğer nedeni de, sunucu hafıza'sının "fragmante" olması olabilir. Örneğin, oldukça büyük, belki birkaç yüz MB kadar, bir nesne yaratmak istediniz. GC, hafızadan bu ebatta tek parça bir alan almak ister. Eğer hafızamız çok fazla fragmante olmuşsa bu ebatta bir alan bulamayabilir, ve toplam boş alanımız bundan çok daha fazla olsa da OOM alabiliriz.</p> <p>Sonuç olarak, ortamımız ve uygulamamız 64bit olsa dahi, uygulamamızı geliştirirken hafıza kullanımına dikkat etmemiz gerekir. Uygulamamız OOM almasa bile, hafıza kullanımı .NET uygulamalarında performansa direkt etki eder.</p> <p>CENK İŞCAN</p>]]></content:encoded>
    </item>
    <item>
      <title>Web uygulamalarında performansa dair...-2-</title>
      <link>https://docs.microsoft.com/archive/blogs/cenkiscan/web-uygulamalarnda-performansa-dair-2</link>
      <pubDate>Wed, 18 May 2011 02:09:00 GMT</pubDate>
      <dc:creator><![CDATA[CenkIscan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/cenkiscan/2011/05/18/web-uygulamalarnda-performansa-dair-2/</guid>
      <description><![CDATA[Bir .NET uygulamasında performanstan bahsederken ilk konuşulması gereken şey, uygulamanın hafıza...]]></description>
      <content:encoded><![CDATA[<p>Bir .NET uygulamasında performanstan bahsederken ilk konuşulması gereken şey, uygulamanın hafıza kullanım miktarıdır. .NET uygulamalarında - ve &ouml;zellikle de ASP.NET uygulamalarında da - yanlış hafıza y&ouml;netimi ve/veya kullanımı performansı direkt olarak olumsuz etkileyecektir. </p>
<p>.NET uygulamalarında hafıza y&ouml;netimi işini (yani nesneler i&ccedil;in hafızada yer ayrılması ve sonra temizlenmesi) Garbage Collector (GC) mekanizması yapar. GC'nin faklı &ccedil;alışma şekilleri vardır. Normalde hangi modun kullanılacağına CLR otomatik olarak karar verir. ASP.NET uygulamaları genellikle &ccedil;ok CPU'lu makinelerinde &ccedil;alışacağından, "server GC" kullanırlar. Bunun anlamı, en basit şekliyle, şudur:</p>
<p>Uygulama &ccedil;alışmaya başladığında mantıksal (logical) CPU sayısı kadar "thread", GC'ye ayrılır. Bu thread'ler GC dışında bir iş yapmazlar. GC devreye girmeye karar verdiğinde aktif t&uuml;m istekler, t&uuml;m işler askıya alınır ve bu thread'ler hafızadaki nesneleri taramaya ve temizlemeye başlarlar. Bu iş boyunca yeni gelen istekler de kuyruğa d&uuml;şerler. Yani uygulamamız tamamen durur. </p>
<p>Sırf bu tanıma bakarak bile şu sonucu &ccedil;ıkarabiliriz: GC ne kadar seyrek devreye girerse ve devreye girdiğinde ne kadar kısa s&uuml;re &ccedil;alışırsa, uygulamanın genel performansına olumsuz etkisi o kadar az olacaktır. Ancak asıl sorun da tam olarak burada karşımıza &ccedil;ıkıyor: Bunu nasıl sağlayacağız?</p>
<p>.NET uygulamalarında, manuel olarak tetiklemek dışında GC'ye m&uuml;dahale edemiyoruz. Manuel tetiklemenizi de, &ccedil;ok istisnai senaryolar dışında - kesinlikle &ouml;nermiyoruz. GC sayısını azaltmanın ve kısa s&uuml;rmesini sağlamanın tek yolu, uygulamanın genel hafıza kullanımını d&uuml;ş&uuml;rmektir. Ancak bu, &ouml;zellikle de ASP.NET uygulamalarında &ccedil;ok da kolay bir iş değildir.</p>
<ul>
<li>İlk dikkat etmemiz gereken nokta "string" birleştirme (concatination) işleridir. Daha &ouml;nce bir <a target="_blank" href="http://blogs.msdn.com/b/cenkiscan/archive/2008/12/15/string-i-lemleri-ve-performans.aspx">blog</a>umda bahsettiğim gibi aşırı miktarda "string concatination" yapmak memory kullanımını olumsuz etkileyecektir. Bununla ilgili &ccedil;ok sayıda sorunla karşılaştık. </li>
<li>Bir başka nokta, aşırı b&uuml;y&uuml;k DataTable/DataSet nesneleri yaratmamak, veritabanından sadece ihtiyacımız olduğu kadar veri &ccedil;ekmektir. </li>
<li>Session'larda tutulan nesneler potansiyel olarak uzun s&uuml;re hafızada kalacaklarından bunların ebatları ve adetlerine de dikkat etmenizi &ouml;neririm. </li>
<li>Ebatı 85000 byte'tan b&uuml;y&uuml;k nesneler diğerlerinde farklı bir "heap"te tutulur&nbsp; ve GC onlara farklı davranır. Bu nedenle bu b&uuml;y&uuml;kl&uuml;kteki nesnelerin sayısının olabildiğince az olması gerekir. </li>
<li>"Viewstate" nesnelerinin ebatı olduk&ccedil;a b&uuml;y&uuml;yebilmektedir. Bunları kontrol altında tutmak, ve ihtiya&ccedil; olmayan kontroller i&ccedil;in kapatmak da fayda sağlayacaktir. </li>
<li>Veritabanı başlantı nesneleri gibi "Close" veya "Dispose" metoduna sahip nesnelerin işleri biter bitmez kapatılması gerekir. B&ouml;ylece m&uuml;mk&uuml;n oduğunca kısa s&uuml;re hafızada kalmış olurlar.</li>
</ul>
<p>T&uuml;m bunlara ve daha fazlasına, uygulamanızın yapısına ve ihtiya&ccedil;larına g&ouml;re sizin karar vermeniz gerekmektedir.</p>
<p><strong>Performance monitor</strong></p>
<p>Aşağıdaki performans saya&ccedil;ları hem hafıza kullanımımız hakkında fikir verecektir, hem de GC'nin genel performansımıza etkisini g&ouml;sterecektir (t&uuml;m saya&ccedil;lar ".NET CLR Memory" altındadır):</p>
<ul>
<li><strong># Bytes in all Heaps:</strong> Uygulama &uuml;zerindeki t&uuml;m .NET nesnelerinin toplam ebatını g&ouml;sterir. </li>
<li><strong># Gen 0, 1, 2 Collections:</strong> Bu saya&ccedil;lar, her bir "generation" i&ccedil;in GC'nin toplam ka&ccedil; defa devreye girdiğini g&ouml;sterir. Burada g&ouml;receğimiz rakamlardan ziyade artış hızı &ouml;nemli olacaktır. Bununla ilgili net bir rakam vermemiz m&uuml;mk&uuml;n değildir. Ancak, &ouml;rneğin, saniyede onlarca defa GC devreye giriyorsa, bunun performansa etkisinin &ccedil;ok olumsuz olacağını rahatlıkla s&ouml;yleyebiliriz. İşte tam da bunları azaltmanın yolu yukarıda bahsettiklerimizdir. <br />Bu saya&ccedil;larla ilgili bir diğer &ouml;nemli nokta da, Gen 0, 1 ve 2 arasındaki orandır. İdeal olan aralarında sırasıyla 100:10:1 gibi bir oran olmasıdır. Elbette ger&ccedil;ekte bu neredeyse hi&ccedil; bir zaman m&uuml;mk&uuml;n olmayacaktır. Ama yine de birbirlerine &ccedil;ok yakın değerler g&ouml;r&uuml;yorsak hafıza kullanımızda sorunlar/sıkışmalar yaşadığımız a&ccedil;ıktır. </li>
<li><strong># Induced GC:</strong> Manuel olarak tetiklenen GC adedini g&ouml;sterir. Bunun, yukarıda da bahsettiğim gibi, sıfır olmasını bekliyoruz.</li>
</ul>
<p><strong>Kaynaklar</strong></p>
<p>Garbage Collection: Automatic Memory Management in the Microsoft .NET Framework<br /><a target="_blank" href="http://msdn.microsoft.com/en-us/magazine/bb985010.aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]">http://msdn.microsoft.com/en-us/magazine/bb985010.aspx</a></p>
<p>Automatic Memory Management<br /><a target="_blank" href="http://msdn.microsoft.com/en-us/library/f144e03t.aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]">http://msdn.microsoft.com/en-us/library/f144e03t.aspx</a></p>
<p>&lt;gcServer&gt; Element<br /><a target="_blank" href="http://msdn.microsoft.com/en-us/library/ms229357.aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]">http://msdn.microsoft.com/en-us/library/ms229357.aspx</a></p>
<p>&lt;gcConcurrent&gt; Element<br /><a target="_blank" href="http://msdn.microsoft.com/en-us/library/yhwwzef8.aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]">http://msdn.microsoft.com/en-us/library/yhwwzef8.aspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>İstemci IP adresleri</title>
      <link>https://docs.microsoft.com/archive/blogs/cenkiscan/stemci-ip-adresleri</link>
      <pubDate>Thu, 03 Feb 2011 01:34:22 GMT</pubDate>
      <dc:creator><![CDATA[CenkIscan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/cenkiscan/2011/02/03/stemci-ip-adresleri/</guid>
      <description><![CDATA[Bugün pek çok web uygulaması birden fazla sunucu üzerinde hizmet vermektedir. Bu sunucular arasında...]]></description>
      <content:encoded><![CDATA[<p>Bugün pek çok web uygulaması birden fazla sunucu üzerinde hizmet vermektedir. Bu sunucular arasında yük dağılımı ise çeşitli şekillerde yapılabilmektedir:</p> <ul> <li>DNS round-robin  </li><li>Windows Network load balance servisi  </li><li>Yük dağıtım cihazları (hardware load balancer)  </li><li>Applicatıon Request Routing (ARR) modülü (bununla ilgili bir yazı yazmayı planlıyorum)</li></ul> <p>Yük dağıtım cihazları ve ARR'nin ortak bir sorunu var: We sunuculara yönlendirdikleri isteklerde istemci IP adresi yerine kendi IP'lerini gönderirler. Elbette yapacağımız ayarlarla bunu kapatabiliriz. Ancak kapatırsak bu cihazların/madülün sağlayacağı pek çok hizmetten ve özellikten de mahrum kalıyoruz. </p> <p>Sunucu loglarında istemci IP adreslerinin bulunması çoğu zaman zaruridir. Bun göre istatistiki veriler çıkarabileceğimiz gibi, geçmişe dönük güvenlik taramaları da yapabiliriz. Veya belirli bir kullanıcının yaşadığı sorunların nedenini araştırırken de bu bilgiye ihtiyacımız olacaktır. Yük dağıtım cihazları da, yukarıdaki soruna çözüm için, istemci IP adresini sunucuya bir "header" ile gönderebilmektedirler. Hatta genel kabul görmüş "header" adı olarak da "X-Forwarded-For" kullanılır.</p> <p>Burada bir sonraki sorun, "X-Forwarded-For" "header"ı ile gelen bu bilgiyi IIS loglarına kaydetmektir. IIS 6.0 ve öncesinde bu iş için yük dağıtıcı cihaz firmalarının sağladığı veya Internet'te örnek kodlarını bulabileceğiniz "ISAPI filter"lar kullanılıyordu. Ancak IIS 7.0'dan itibaren mimari değiştiği için bunları kullanma şansımız kalmadı. İşte bu noktada "Advanced Logging" modülü devreye giriyor. Daha önceki bir yazımda kısaca bahsettiğim bu modülü kullanarak istediğiniz hemen her şeyin IIS loglarına kaydedilmesini sağlayabilirsiniz. Elbette buna istek "header"ları da dahildir. Bunun için izlemeniz gereken adımlar aşağıdaki gibidir:</p> <ol> <li>"<a href="http://technet.microsoft.com/en-us/library/ee791852(WS.10).aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">Advanced Logging</a>" modülünü indirip kurun.  </li><li>IIS Manager arayüzünde bunu tanımlamak istediğiniz web sitesini sol taraftan seçip, orta bölümde "Advanced Logging" ikonuna çift tıklayın:<br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/2185.AL_1_2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/2185.AL_5F00_1_5F00_2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="AL_1" border="0" alt="AL_1" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/3175.AL_1_thumb.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/3175.AL_5F00_1_5F00_thumb.png" width="599" height="348" /></a><br /> </li><li>"%COMPUTERNAME%*Server"ı seçip sağ taraftan "Clone Log Definition."a tıklayın:<br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/4251.AL_2_2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/4251.AL_5F00_2_5F00_2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="AL_2" border="0" alt="AL_2" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/3187.AL_2_thumb.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/3187.AL_5F00_2_5F00_thumb.png" width="484" height="264" /></a><br /> </li><li>Daha sonra yeni yaratılan log tanımını seçip sağ taraftan "Edit Logging Fields."a tıklayın:<br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/8473.AL_3_2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/8473.AL_5F00_3_5F00_2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="AL_3" border="0" alt="AL_3" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/8484.AL_3_thumb.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/8484.AL_5F00_3_5F00_thumb.png" width="470" height="253" /></a><br /> </li><li>Açılan pencerede "Add Field." butonuna tıklayarak şu bilgilerle bir tanım yaratın:<br />Field ID: OrigClient-IP<br />Category: Default<br />Source type: Request Header<br />Source name: X-Forwarded-For<br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/3515.AL_4_2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/3515.AL_5F00_4_5F00_2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="AL_4" border="0" alt="AL_4" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/2022.AL_4_thumb.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/2022.AL_5F00_4_5F00_thumb.png" width="686" height="505" /></a><br /> </li><li>Bu yarattığımız tanımı aktif hale getirmek için "Advanced Logging" arayüzünde yine yeni yaratılan tanımı seçip sağ taraftan "Edit Log Definition."a tıklayın:<br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/7823.AL_5_2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/7823.AL_5F00_5_5F00_2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="AL_5" border="0" alt="AL_5" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/4101.AL_5_thumb.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/4101.AL_5F00_5_5F00_thumb.png" width="579" height="257" /></a><br /> </li><li>Bu ekranda "Select Fields" butonuna tıklayarak loglanmasını istediğiniz tüm alanları seçebilirsiniz. Buradaki listede yeni eklediğimiz "OrgClient-IP" isimli alanı da görebilirsiniz:<br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/2538.AL_6_2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/2538.AL_5F00_6_5F00_2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="AL_6" border="0" alt="AL_6" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/4111.AL_6_thumb.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/4111.AL_5F00_6_5F00_thumb.png" width="632" height="520" /></a><br /></li></ol> <p>Tüm bu tanımlardan sonra, IIS'in kendi loglarının yanısıra bu loglar da tutulmaya başlayacaktır. İhtiyaçlarınıza bağlı olarak IIS'in loglarını kapatabilir, ya da her ikisinin de tutulmasını sağlayabilirsiniz.  <p>Advanced Logging, IIS loglarının aksine kernel modda yazılmadığı için, direkt "kernel cache"ten yanıtlanan veya kernel seviyesinden bloklanan istekler bu loglarda bulunmayacaktır.</p> <p>Son olarak şunu da belirtmek lazım: Bu şekilde tutacağınız loglar da W3C formatında olacağından Log Parser ile inceleme şansınız olacaktır. </p> <p>NOT: Yukarıda bahsettiklerim, "Advanced Logging" modülü ile gelen özelliklerden sadece biri ("Custom logging"). Diğer ilginç ve faydalı olabilecek özellikleri "Request Filtering", "Real-time logging" ve "Client logging"dir. Bunlarla ilgili detaylı bilgileri aşağıdaki linklerden bulabilirsiniz:</p> <p>Advanced Logging<br /><a title="http://technet.microsoft.com/en-us/library/ee791852(WS.10).aspx" href="http://technet.microsoft.com/en-us/library/ee791852(WS.10).aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]" target="_blank">http://technet.microsoft.com/en-us/library/ee791852(WS.10).aspx</a></p> <p>Advanced Logging<br /><a title="http://www.iis.net/download/AdvancedLogging" href="http://www.iis.net/download/AdvancedLogging">http://www.iis.net/download/AdvancedLogging</a></p> <p>CENK ISCAN</p></p>]]></content:encoded>
    </item>
    <item>
      <title>Log Parser: Örnek komutlar</title>
      <link>https://docs.microsoft.com/archive/blogs/cenkiscan/log-parser-rnek-komutlar</link>
      <pubDate>Mon, 17 Jan 2011 04:51:31 GMT</pubDate>
      <dc:creator><![CDATA[CenkIscan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/cenkiscan/2011/01/17/log-parser-rnek-komutlar/</guid>
      <description><![CDATA[Daha önceki bir yazımda Log Parser isimli araçtan ve ne şekilde kullanılabileceğinden bahsetmiştim....]]></description>
      <content:encoded><![CDATA[<p>Daha önceki bir <a href="http://blogs.msdn.com/b/cenkiscan/archive/2008/05/16/logparser.aspx">yazımda</a> Log Parser isimli araçtan ve ne şekilde kullanılabileceğinden bahsetmiştim. Şimdi ise, işinize yarayacağına inandığım bazı örnekleri paylaşmak istiyorum. Aşağıda her komutun açıklamasını ve hemen altında da örnek bir sonucu bulabilirsiniz:</p> <ul> <li>Sayfa bazlı olarak istatistiki bilgiler çekmek için aşağıdaki komutu kullanabilirsiniz (bunun bir benzerini daha önceki yazımda da paylaşmıştım ancak bu seferki daha detaylı bilgi sağlıyor). Sonuç olarak çıkan text dosyada her sayfa için ortalama ve maksimum yanıtlanma süresi, ortalama ve maksimum istek ve yanıt büyüklükleri bulunmaktadır. İdeal bir ortamda, herhangi bir sayfanın ortalama yanıtlanma süresinin bir saniyenin altında olmasını bekleriz - ancak elbette bunun istisnaları olabilir. Aşağıdaki görüntü, log parser'dan alınan sonucun Excel'e taşınmasıyla elde edilmiştir.  <ul> <li>logparser "SELECT COUNT(*) As Hits, AVG(time-taken) AS AvgTimeTaken, MAX(time-taken) AS MaxTimeTaken, AVG(cs-bytes) AS AvgRecievedBytes, MAX(cs-bytes) AS MaxRecievedBytes, AVG(sc-bytes) AS AvgSentBytes, MAX(sc-bytes) AS MaxSentBytes, TO_LOWERCASE(cs-uri-stem) AS PageName, sc-status AS Status, sc-substatus AS SubStatus INTO istatistik.txt FROM *.log GROUP BY PageName, Status, SubStatus ORDER BY PageName" -i:IISW3C -o:W3C<br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/6403.image_2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/6403.image_5F00_2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/8053.image_thumb.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/8053.image_5F00_thumb.png" width="644" height="200" /></a></li></ul></li></ul> <p>&nbsp;</p> <ul> <li>Aşağıdaki komutla istek sayılarının - tüm sayfalara ve tüm içeriğe gelen toplam isteklerin - zamana göre dağılım grafiğini çizdirebiliriz:  <ul> <li>logparser "SELECT TO_LOCALTIME(QUANTIZE(TO_TIMESTAMP(date, time), 600)) AS ZamanDilimi, COUNT(*) AS IstekAdedi INTO IstekDagilimi.gif FROM *.log GROUP BY ZamanDilimi ORDER BY ZamanDilimi" -i:W3C -o:CHART -chartType:ColumnClustered -chartTitle:"İstek Dağılımı"<br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/4667.IstekDagilimi_2.gif" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/4667.IstekDagilimi_5F00_2.gif"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="IstekDagilimi" border="0" alt="IstekDagilimi" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/5756.IstekDagilimi_thumb.gif" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/5756.IstekDagilimi_5F00_thumb.gif" width="644" height="484" /></a></li></ul></li></ul> <p>&nbsp;</p> <ul> <li>Ortalama istek sayısının ortalama yanıtlanma süresine etkisini aşağıdaki grafikte görebiliriz:  <ul> <li>logparser "SELECT TO_LOCALTIME(QUANTIZE(TO_TIMESTAMP(date, time), 600)) AS ZamanDilimi, MUL(AVG(time-taken), 20) AS 20x_AvgTimeTaken, COUNT(*) AS Hits INTO AvgTimeGraph.gif FROM *.log GROUP BY ZamanDilimi ORDER BY ZamanDilimi" -i:W3C -o:CHART -chartType:line -chartTitle:"Ortalama yanıt süresi / Toplam istek sayısı" -e:10<br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/1031.image_4.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/1031.image_5F00_4.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/5228.image_thumb_1.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/5228.image_5F00_thumb_5F00_1.png" width="644" height="484" /></a></li></ul></li></ul> <p>&nbsp;</p> <ul> <li>Dosya uzantılarına göre gelen isteklerin dağılım grafiğini aşağıdaki şekilde çıkarabiliriz:  <ul> <li>logparser "SELECT TOP 10 CASE EXTRACT_EXTENSION(cs-uri-stem) WHEN '' THEN '/' ELSE EXTRACT_EXTENSION(cs-uri-stem) END AS Uzantı, COUNT(*) AS Adet INTO extensions.gif FROM *.log GROUP BY Uzantı ORDER BY Adet DESC" -i:W3C -o:chart&nbsp; -chartType:PieExploded3D -chartTitle:"Dosya uzantısı dağılımı"<br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/6303.extensions_4.gif" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/6303.extensions_5F00_4.gif"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="extensions" border="0" alt="extensions" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/94/61/metablogapi/1106.extensions_thumb_1.gif" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-94-61-metablogapi/1106.extensions_5F00_thumb_5F00_1.gif" width="644" height="484" /></a></li></ul></li></ul> <p>CENK ISCAN</p>]]></content:encoded>
    </item>
    <item>
      <title>ProcDump</title>
      <link>https://docs.microsoft.com/archive/blogs/cenkiscan/procdump</link>
      <pubDate>Mon, 17 Jan 2011 04:39:00 GMT</pubDate>
      <dc:creator><![CDATA[CenkIscan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/cenkiscan/2011/01/17/procdump/</guid>
      <description><![CDATA[Daha önceki bir yazımda, hangi sorun türlerinde ne şekilde "dump" alınması gerektiğinden...]]></description>
      <content:encoded><![CDATA[<p>Daha önceki bir yazımda, hangi sorun türlerinde ne şekilde "dump" alınması gerektiğinden bahsetmiştim. O yazımda bahsetmediğim ancak zaman zaman rastladığımız bir senaryo da, kısa süreli CPU yükselmeleridir. </p> <p>&nbsp;</p> <p>Yüksek CPU kullanımı sorunlarında, arka arkaya 2-3 defa "hang dump" alıp incelemek gerekecektir. Ancak, CPU kullanımı sadece bırkac saniye için yükselip sonra düşüyorsa - ve birkaç saniye sonra bunu tekrarlıyorsa - bu şekilde alacağımız dumplar her zaman yardımcı olmayabilir. İşte tam da bu soruna bir çözüm olarak Mark Russinovich bir araç geliştirmiş: <a href="http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx?ocid=soc-n-[TR]-loc-[Services]-[cenki]">ProcDump</a>. </p> <p>Bu araç ile, belirli bir "process", belirli bir süre, belirli bir limitin üstünde CPU tüketirse dump aldırabiliyoruz. Komut satırından çalısan bu aracın oldukça basit bir kullanımı var. Aşağıda da paylaştığım kendi "yardım"ında detaylı olarak kullanımdan behsediliyor ve oldukça güzel örnekler de verilmiş. ancak birkaç şeyin altını özellikle çizmek istiyorum:</p> <ul> <li>Bir process'in CPU kullanımı X değerini Y süresi boyunca geçtiğinde toplam Z adet dump al diyebiliyoruz.  </li><li>"Crash" dump aldırabiliyoruz.  </li><li>Bir process'in hafıza kullanımı belirli bir limite geldiğinde dump aldırabiliyoruz.  </li><li>Dump almadan önce process'in RAM üzerinde bir kopyasını yaratabiliyoruz. Böylece dump dosyasının diske yazılması sırasında process hizmet vermeye devam edecektir.</li></ul> <p>Aşagıda procdump.exe'nin yardım bilgilerini bulabilirsiniz:</p> <blockquote> <p><font size="2" face="Courier New">C:\&gt;procdump.exe /?</font></p> <p><font size="2" face="Courier New">ProcDump v3.01 - Writes process dump files<br />Copyright (C) 2009-2010 Mark Russinovich<br />Sysinternals - www.sysinternals.com</font></p> <p><font size="2" face="Courier New">Monitors a process and writes a dump file when the process exceeds the<br />specified CPU usage.</font></p> <p><font size="2" face="Courier New">usage: procdump [-64] [[-c CPU usage] [-u] [-s seconds]] [-n exceeds]&nbsp; [-e [1]] [-h] [-m commit usage] [-ma | -mp] [-o] [-p counter threshold] [-r] [-t] &lt; &lt;process name or PID&gt; [dump file]] | [-x &lt;image file&gt; &lt;dump file&gt; [arguments]&gt;<br />&nbsp;&nbsp; -64&nbsp;&nbsp;&nbsp;&nbsp; By default Procdump will capture a 32-bit dump of a 32-bit process<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when running on 64-bit Windows. This option overrides to create a<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 64-bit dump.<br />&nbsp;&nbsp; -c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CPU threshold at which to create a dump of the process.<br />&nbsp;&nbsp; -e&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Write a dump when the process encounters an unhandled exception.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Include the 1 to create dump on first chance exceptions.<br />&nbsp;&nbsp; -h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Write dump if process has a hung window (does not respond to<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; window messages for at least 5 seconds).<br />&nbsp;&nbsp; -m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Memory commit threshold in MB at which to create a dump of the<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; process.<br />&nbsp;&nbsp; -ma&nbsp;&nbsp;&nbsp;&nbsp; Write a dump file with all process memory. The default<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dump format includes thread and handle information.<br />&nbsp;&nbsp; -mp&nbsp;&nbsp;&nbsp;&nbsp; Write a dump file with thread and handle information, and all<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; read/write process memory. To minimize dump size, memory areas<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; larger than 512MB are searched for, and if found, the largest<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; area is excluded. A memory area is the collection of same<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sized memory allocation areas. The removal of this (cache)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; memory reduces Exchange and SQL Server dumps by over 90%.<br />&nbsp;&nbsp; -n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Number of dumps to write before exiting.<br />&nbsp;&nbsp; -o&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Overwrite an existing dump file.<br />&nbsp;&nbsp; -p&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Trigger on the specified performance counter when the threshold<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is exceeded. Note: to specify a process counter when there are<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; multiple instances of the process running, use the process ID<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with the following syntax: "\Process(&lt;name&gt;_&lt;pid&gt;)\counter"<br />&nbsp;&nbsp; -r&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Reflect (clone) the process for the dump to minimize the time<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the process is suspended (Windows 7 and higher only).<br />&nbsp;&nbsp; -s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Consecutive seconds CPU threshold must be hit before dump is<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; written (default is 10).<br />&nbsp;&nbsp; -t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Write a dump when the process terminates.<br />&nbsp;&nbsp; -u&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Treat CPU usage relative to a single core.<br />&nbsp;&nbsp; -x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Launch the specified image with optional arguments.<br />Use the -accepteula command line option to automatically accept the<br />Sysinternals license agreement.</font></p> <p><font size="2" face="Courier New">To just create a dump of a running process, omit the CPU threshold. If<br />you omit the dump file name, it defaults to &lt;processname&gt;_&lt;datetime&gt;.dmp.</font></p> <p><font size="2" face="Courier New">Example: Write up to 3 dumps of a process named 'consume' when it exceeds<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20% CPU usage for five seconds to the directory<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c:\dump\consume with the name consume.dmp:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\&gt;procdump -c 20 -s 5 -n 3 -o consume c:\dump\consume<br />Example: Write a dump for a process named 'hang.exe' when one of it's<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; windows is unresponsive for more than 5 seconds:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\&gt;procdump -h hang.exe hungwindow.dmp<br />Example: Write 3 dumps 5 seconds apart:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\&gt;procdump -s 5 -n 3 notepad.exe notepad.dmp<br />Example: Launch a process and then monitor it for excessive CPU usage:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\&gt;procdump -c 30 -s 10 -x consume.exe consume.dmp<br />Example: Write a dump of a process named 'iexplore' to a dump file<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; that has the default name iexplore.dmp:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\&gt;procdump iexplore<br />Example: Write a dump of a process named 'outlook' when total system<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CPU usage exceeds 20% for 10 seconds:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\&gt;procdump outlook -p "\Processor(_Total)\% Processor Time" 20<br />Example: Write a dump of a process named 'outlook' when Outlook's handle count<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exceeds 10000:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\&gt;procdump outlook -p "\Process(Outlook)\Handle Count" 10000</font></p></blockquote> <p>CENK</p>]]></content:encoded>
    </item>
  </channel>
</rss>