views:

117

answers:

2

The solution is for a project in which changing all instances of Session[string] is not an option. My thoughts have been implementing the SessionStateStoreProviderBase. I understand that creating a class Session and having properties like Session.UserName would be a good idea.

Edit: The goal here is to turn off Sessions per user request, not application wide, without changing code in each aspx page.

+1  A: 

First you need a way to tell a bot from a human apart.

When you're through, consider what do you want to achieve.

If you wish to disable Session to bots, then be sure it won't break you site. If a search engine bot gets a crashed page, it will index and rank it as such.

Developer Art
A: 

Set up your robots.txt file to direct (most) bots to a page of your choice, where you have control over session and other information. If you want free access to all pages, you have to put in code to distinguish bots by http header information - that's a research project in itself.

dar7yl