Tuesday, January 8, 2013

IIS 8 Tips

I have read a nice book called "Professional IIS 8" and these some of the tips I found them useful to posted here and sometimes these tips will help the SharePoint Administrator or Developer.
Note: Some of these tips apply to previous version of IIS ( 6 , 7 or 7.5).

  1. You can use appcmd or power shell as command utilities for automation or using managed code like C#.
  2. SSL Certificate no longer need to bound to an IP address. SNI allows an IIS 8 to host multiple SSL sites and certificates on a single IP address.
    http://windowsworld.in/?p=555
    http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-server-name-indication-sni-ssl-scalability
     
  3. IISLogs external tool whcih help you to mange the logs on schedule basis.
    http://www.iislogs.com/
  4. IIS can host different application like Asp , Asp.net and PHP.
    http://www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/using-fastcgi-to-host-php-applications-on-iis
  5. You can install IIS 8 Express on windows 7 for development purpose with Visual Studio 2012 (no IIS Manager ).
  6. Microsoft Web Capacity Analysis tool (WCAT) to test a load on web servers.
    http://support.microsoft.com/kb/231282
    http://www.galcho.com/articles/StressTestingWCAT.aspx
  7. IIS 8's Request Tracing utility can be used for testing performance and diagnostic the errors.
    http://www.trainsignal.com/blog/iis-7-troubleshooting
  8. MaxConcurrentRequestsPerCpu setting can enhance or optimze the performance
    http://blogs.x2line.com/al/archive/2010/01/04/3718.aspx
    http://blogs.msdn.com/b/rakkimk/archive/2009/07/08/iis7-improving-asp-net-performance-concurrent-requests-while-on-integrated-mode.aspx?Redirected=true
  9. By default IIS 8 installed with Asp.net 4.5 and you can install and run .Net 3.5.
  10. You can upgrade from IIS 7 to II 8 and same sites with same configuration can run.
  11. You can manage IIS 8 remotely over HTTPS using Web Management Service (WMSVC).
    http://www.tech-stew.com/post/2012/10/08/How-to-install-IIS-remote-manager-in-Windows-8.aspx
    http://technet.microsoft.com/en-us/library/jj635856.aspx
    http://www.iis.net/learn/manage/remote-administration/remote-administration-for-iis-manager
  12. Local Administrators can manage IIS but by using Delegation feature you can allow none administrators to manage websites or applications.
  13. You can extend IIS Manager using managed code or native code.
  14. You can set configuration at sub folder or file level using Location tag in configuration file
    http://blogs.iis.net/bills/archive/2008/03/24/how-to-enable-directory-browsing-with-iis7-web-config.aspx
  15. IIS 8 support different types of logs like IIS , W3C (widely used) and NCSA and you need a tool to parse them like logparser (you need to consider the time zone and reverse proxy infrastructure).
    http://www.microsoft.com/en-us/download/details.aspx?id=24659
    http://logparserplus.com/Examples
  16. It's recommended to enable compression to save bandwidth usage
  17. If MIME type is not defined then the browser will return 404.3 error.
  18. To stop IIS run the following command : net stop iisadmin /y or stop these services (World wide web publishing , SMTP and FTP publishing).
  19. Application initialization module (in IIS 7.5 called application warm up) to prime the application before receiving HTTP requests from the end users.
    http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-application-initialization
    http://sharepoint.nauplius.net/2012/06/sharepoint-warm-up-scripts-a-thing-of-the-past/
    http://sharepointgeorge.com/2010/warm-sharepoint-web-applications-windows-2008-r2-iis-75-application-warmup-module/
  20. Recycle process does not immediately stop the w3wp process , instead it create new process and then move the requests there.
  21. Web Gardens is an application pool that is serviced by more than one worker process simultaneously (Created on Demand). It's useful in situations where :
    1. High number of concurrent connections.
    2. No application Session state.
    3. Not be CPU -intensive.
      http://geekswithblogs.net/vkamat/archive/2004/11/17/15145.aspx
  22. Classic mode pipeline for compatibility.
  23. In IIS 8 you can view the running w3wp process in IIS Manager and running page requests ( good to check the slow running page).
    http://www.codeproject.com/Articles/125113/How-to-use-IIS-Manager-to-get-Worker-Processes-w3w
    http://programming4.us/website/6646.aspx
  24. Application pool use configuration isolation concept by stored temprorary files from the global configuration (needed settings) in this folder (\inetpub\temp\appPools).
  25. You can change bitness mode to 32 or 64 bit at application pool level.
  26. You can configure SSL with FTP in IIS 8 (FTPS) and you can use host headers.
  27. You can apply filtering to FTP by File extension or restricted domain or IPs.
  28. You can use .Net Accounts with FTP.
  29. IIS 7 and above ship with more than 40 modules and you can create your custom module.
  30. Windows Process Activation Service (WAS) will respond to requests other than HTTP such as TCP and MSMQ. (One of the feature of WCF).
  31. Dynamic IP Restrictions to block malicious web requests designed to infiltrate your web server and you can show access denied page or page not found.
    http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-dynamic-ip-address-restrictions
  32. Placing servers in DMZ or internally or even at hosting company based on two factors : first the function of the server and second who needs access.
  33. To enable or disable session state for Asp.net go to Pages and Controls section under Asp.net in IIS.
  34. You can load only the required modules and this will increase the server and site performance 
    1. At web server level , you need to modify applicationhost.config file so for example to render only static Html page
    2. <modules>
      <add name="DefaultDocumentModule" />
      <add name="StaticFileModule" />
      <add name="AnonymousAuthenticationModule" />
      </modules>
      
    3. At web site level , you need to modify the web.config file
  35. Using IP and Domain Restrictions allows you to selectively permit or deny access to the web server , web sites , folders and files.
    http://www.dotnetexpertguide.com/2012/03/iis-8-dynamic-ip-domain-restriction.html
  36. Request Filtering provides a configurable set of rules that enables you to determine which types of request should be allowed or rejected (URLscan module).
    http://technet.microsoft.com/en-us/library/hh831621.aspx
    http://www.iis.net/configreference/system.webserver/security/requestfiltering
    http://www.hosting.com/support/iis7/enabling-the-request-filtering-ui-
  37. URL authorization is a feature that can be used to permit or deny access to resources by rules in data sources like (databases or XML).
    http://www.iis.net/learn/manage/configuring-security/understanding-iis-url-authorization
  38. Backup and Restore IIS settings and configurations
    http://sharepointadam.com/2010/04/01/backup-iis-configuration-settings-via-powershell/
    http://social.technet.microsoft.com/wiki/contents/articles/10526.sharepoint-2010-backup-and-restore-iis-web-server-configuration-through-powershell-en-us.aspx
    http://thuansoldier.net/?p=1607
  39. URL Rewrite module can 
    1. Redirect URL
    2. Rewrite URL
    3. Set custom HTTP Response
    4. Abort Request
    5. None
      http://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module
      http://weblogs.asp.net/owscott/archive/2010/01/26/iis-url-rewrite-hosting-multiple-domains-under-one-site.aspx
      http://www.techrepublic.com/blog/webmaster/url-rewriting-with-iiss-url-rewrite-module/710
  40. Application Request Routing (ARR) (IIS like Load Balance).
    http://www.iis.net/downloads/microsoft/application-request-routing
    http://improve.dk/archive/2010/06/16/setting-up-multiple-iis-application-request-routing-farms-on-the-same-server.aspx
  41. Monitoring tools
    1. Server Manager in Windows Server 2012
    2. Task Manager
    3. Windows Performance Monitor
    4. Resource Monitor
    5. Resource and Performance Monitor
  42. What to Monitor ?
    1. Memory Usage
    2. Process Utilization
    3. Disk I/O
    4. Network Bandwidth
    5. Web Service Counters
    6. Asp.Net Counters
    7. Logs (IIS Logs , Event Viewer logs and application logs)
  43. Website Optimizations
    1. HTTP keep-Alive
    2. Content Expiration
    3. Bandwidth throttling
    4. Output Caching
    5. HTTP compression
    6. Website connections
  44. WFetch is a tool which listen to all web traffic and see everything included in the communication between IIS and web client including request , response ,headers ,body,...
    http://support.microsoft.com/kb/284285
  45. Web Socket
    http://alexjmackey.wordpress.com/2012/05/01/websockets-with-asp-net-4-5-and-visual-studio-11/
    http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support

3 comments:

Mostafa Absy said...

Greate...
One question, what do you mean with ".Net Accounts" in point 28?
Do you mean .net membership?

Muthuramalingam said...

Nice post. I was searching for the factors that should be noted when we monitor IIS. your post gives me some ideas. It would be great if you provide links for 'What to Monitor' and Website Optimizations' too.

Muthuramalingam said...

Nice post. I was searching for the factors that should be noted when we monitor IIS. your post gives me some ideas. It would be great if you provide links for 'What to Monitor' and Website Optimizations' too.