Clear IIS Logs Using Task Scheduler

Wednesday, April 23, 2014

This is something I see a lot, IIS logs takes a lot of space and sometimes even cause the IIS Server to stop due to “Not Enough Space” exception. There is not a build in solution for Log retention policy but several options on File Size, Creation Scheduling etc. There are many solutions for cleaning the Logs but I prefer the Task Scheduler way with a single line for cleaning Logs based on their creation date. Run Task Scheduler from the Command Line Open a command prompt. To open a command prompt, click Start , click All Programs , click Accessories , and...
no comments

SharePoint API – Download \ Upload Documents (Tool)

Thursday, October 27, 2011

Tweet A long time ago I wrote about SharePoint 2007 Files Restore Tool, tool that allows you to connect to SharePoint content database (not need to have SharePoint installation) and extract documents. The reason I wrote this tool was a customer that upgrade TFS and perform a new installation of SharePoint so he lost all his documents, this tool helped me to extract all documents and added them to the new SharePoint site. SharePoint upgrade/migration can be unpleasant and sometimes I prefer to do a clean installation when upgrading or moving TFS and then just import the documents...

Creating Virtual Web Sites on IIS with .Net

Sunday, November 23, 2008

Creating Virtual Web Sites on IIS with .Net My last post on Reading Web Sites Status on IIS with .Net was the first post on IIS development through .NET So here is an example for creating virtual Web Site using .NET.   public DirectoryEntry VDir = null;public string Virtual = ""; public string FriendlyName = "";public string Path = "";public string IISPath = "IIS://LOCALHOST/W3SVC/1/ROOT";public bool AuthNTLM = true;public bool AuthAnonymous = true;public bool AuthBasic = true;public string DefaultDocuments = default.htm,default.aspx,default.asp";     public bool CreateVirtual()     {       DirectoryEntry root = new DirectoryEntry(this.IISPath);       if (root == null)       {...
one comment

Reading Web Sites Status on IIS with .Net

Monday, November 3, 2008

Reading Web Sites Status on IIS with .Net This is some ability I needed for one of my tools.   Using DirectoryEntry to get information about IIS Web Sites and AppPools.   Code Simple:   public WebSiteEntry GetWebSites()     {       string Path = "IIS://" +...
no comments

Fiddler – QuickExec Reference

Sunday, July 20, 2008

Fiddler - QuickExec Reference Fiddler is one of the most common http debugging tool today. Most of you know what is Fiddler and what can we do with him. But for the rest, so…. What is Fiddler? Fiddler is a HTTP Debugging Proxy which logs all HTTP traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP Traffic, set breakpoints, and "fiddle" with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using...

Access Token With C#

Tuesday, April 8, 2008

Last week I had a task to build a tool that can control IIS and Services in another computer in different domain. Performing IIS reset or control Services status in different computer is easy, but when the computer belongs to a different domain those actions becomes quite complicated.  So I found that create an dynamic Access Token is the best way to accomplish those actions. An access token is an object that describes the security context of a process or thread. The information in a token includes the identity and privileges of the user account associated with the process or...

More IIS Tips

Sunday, March 23, 2008

Patch, Patch, Patch! - Okay, we in the IIS world do have to patch our systems and make hotfixes. However, as a former Solaris admin I had to do the same thing there, so I'm not sure why this is a big surprise. You really need to keep up with the patches. Microsoft is of course the definitive source, but if you can also use the highly-regarded Simply search on "IIS". Well there you have it: 10 tips for IIS admins to improve...
no comments

How To: Improve IIS Performance

Thursday, March 13, 2008

How To: Improve IIS Performance In my last post I talked about 10 ways to improve IIS performance, since then couple of people contact me about this post and asked me to give them my recommendations and explain them how find and configure each parameter. So this post will be almost the same except for now I'm going to detail more about each parameter and explain how to find the right value and configure them. 1. Enable HTTP Keep-Alives One way to help your IIS server perform optimally is to make sure that HTTP Keep-Alives are enabled. Although IIS 6.0 enables Keep-Alives by...

10 ways to improve IIS performance

Monday, March 10, 2008

10 ways to improve IIS performance Published On: If you want to enhance the performance of your IIS server(s) you can always cluster them or buy more bandwidth. Unfortunately, this tends to be expensive but happily there a number of ways you can improve performance without incurring these high costs. Individually each of these may do not do much, but combined they could result in major performance gains. Add more memory – To optimize available memory, data is moved back and forth between RAM and disk-based virtual memory. This process is called paging. This process is very inefficient and excessive paging will...