SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a sharepoint site at the web-app level. Time to time, that site should not be accessible until we decide to turn it on. During the period when it is down, if anyone tries to access, I would like capture some details as to who accessed it (IP address etc).

What are the best options (apart from going to IIS and stopping the site)?

If any custom coding is required, please suggest.


share|improve this question
Why not to use app_offline.html?… – Andrey Markeev Aug 5 '11 at 17:37
How to log if anyone has tried to access? Also with the "offline_html" approach, will it work for someone who may have opened the site days back in a browser. I guess it should work, but wanted to confirm. thanks. – Anirudh Aug 5 '11 at 18:00
I believe you can use IIS logs to see if someone is trying to access the offline application. – Andrey Markeev Aug 8 '11 at 6:09
Whole application is goes down, so if you don't have smth like Comet chats or other things which hold the connection open, all will be ok. – Andrey Markeev Aug 8 '11 at 6:11
up vote 1 down vote accepted

If users are authenticated, and you are using AD you could restrict users to certain logon hours. I imagine you could probably log failed logon attempts at the domain controller.

Another option is to stick a reverse proxy server in front of your SharePoint server (e.g. ForeFront TMG) and add a rule to restrict access. User IP addresses, times etc. will be logged.

We use the latter option to prevent access during maintenance windows.

share|improve this answer
Thanks for the inputs. Would appreciate if you can point me to any working examples or samples. thanks again. – Anirudh Aug 5 '11 at 21:45
If you want a working example, our company Web site ( is published using ISA Server 2006. We use a publishing rule to block requests to the site during maintenance windows. If you are after a step by step walkthrough of how to set this up, I blogged the steps for SP2010 / ISA 2006 at Note that this is only a basic example that doesn't include setting up a "maintenance" rule but it's quite straightforward once you are comfortable with ISA. These days you should use TMG instead of ISA. – Benjamin J Athawes Aug 7 '11 at 12:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.