ASP.Dot.NET.2.0.Revealed [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

ASP.Dot.NET.2.0.Revealed [Electronic resources] - نسخه متنی

Patrick A. Lorenz

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید







Using Page Counters


As I stated earlier, page counters are a subfeature of site counters. They allow you to log the request of pages within a web site. Because the expected data volume could be very high, page counters are deactivated by default and have to be activated first through the configuration file web.config:


<siteCounters
enabled="true"
...
>
<pageCounters
enabled="true"
rowsPerDay="1"
trackApplicationName="true"
trackPageUrl="true"
counterGroup="PageCounters"
counterName="
>
<pagesToCount>
<add path="*"/>
</pagesToCount>
</pageCounters>
</siteCounters>

Afterward, all the hits on a page are logged in the counter group PageCounters — namely one line per day and per page, as shown in Figure 10-6.


Figure 10-6: Page counters log every hit on every page of your web site.

Alternatively, you can limit the logging to single pages or define certain areas with the help of wild cards:


...
<pagesToCount>
<clear />
<add path="subdir/*.aspx"/>
</pagesToCount>
</pageCounters>
</siteCounters>

Internally, by the way, page counters work with the System.Web.PageCountersModule module. This HTTP module logs the hits within an event handling of HttpApplication.EndRequest and passes them to the Site Counter API.






Note

Please be aware that only requests of files with the extension .aspx will be logged in the existing version. Web services or hits on files with an individual extension won't be part of the statistic.


/ 133