Proper method to remove www from address using IIS URL Rewrite

If you want it to work with any hostname (not hardcoding it into the rule), you’d want to do something like this: <rule name=”Remove www” stopProcessing=”true”> <match url=”(.*)” ignoreCase=”true” /> <conditions logicalGrouping=”MatchAll”> <add input=”{HTTP_HOST}” pattern=”^www\.(.+)$” /> </conditions> <action type=”Redirect” url=”http://{C:1}/{R:0}” appendQueryString=”true” redirectType=”Permanent” /> </rule> in the redirect action, the {C:1} contains the second capturing group … Read more

IIS7 Accessing Network Share

For IIS 7 running on Windows Server 2008 R2 … In the IIS Manager, select the Application Pool under which your Web Site is running. Click “Advanced Settings”. There will be an entry for Identity (it is under the Process Model section). Click it, provide credentials for your account that has permission to access the … Read more

How do I set up my IIS to keep my application alive?

IIS has a feature in properties where you can stop recycle your IIS on intervals Go to your “IIS Manager” Select “Application Pool” the instance you want to manage. Select “Advanced settings” action Under “Recycling” and set “Regular Time Interval” to 0, which means the application pool does not recycle.

IIS URL Rewrite {R:N} clarification

As per the documentation: When an ECMAScript pattern syntax is used, a back-reference can be created by putting parenthesis around the part of the pattern that must capture the back-reference. So taking the example that follows in the documentation: ^(www\.)(.*)$ And using the input string in the conditions, you will have: {C:0} – … Read more

Enabling net.tcp in IIS7

You need to add net.tcp to the enabled protocols of your site. Go to IIS Manager, right-click on your website, go to ‘Manage Web Site’ or ‘Manage Application’, then to ‘Advanced Settings…’. There you see ‘Enabled Protocols’. It probably says http. Change it to http,net.tcp. If you want to configure bindings, right-click on your website … Read more

IIS7 Permissions Overview – ApplicationPoolIdentity

ApplicationPoolIdentity is actually the best practice to use in IIS7+. It is a dynamically created, unprivileged account. To add file system security for a particular application pool see’s “Application Pool Identities”. The quick version: If the application pool is named “DefaultAppPool” (just replace this text below if it is named differently) Open Windows Explorer … Read more