views:

386

answers:

3

Hi

I am using a ASP.net session in SQL Server mode. I have created the necessary tables and stored procs in a custome db

My question is: Can I use this database to serve more than one application / web site ? Is there anything to take into consideration having multiple websites use the same db for their session store

cheers

+1  A: 

It would make the profiling more difficult if there is a performance problem. Why not create a second state db for the second application? It's not much to do, simple with a different name and specify the different db in your session configuration.

The short answer though is you can use the same session database and each session should be fine, though I wonder if anyone has any comments on colliding sessionIds between the two applications.

dove
Not necessarily--you could just as easily specify the Application Name parameter in the query string and use that to differentiate the apps if you do need to run some profiling. That is presuming all your apps are running under the same SQL user name. Session IDs are GUIDs so collisions basically follow GUID collision contention. In most realistic scenarios you probably don't have to worry about it.
Wyatt Barnett
EDIT: err, I meant to say "Application Name paramter in the connection string" but it's pre coffee so there.
Wyatt Barnett
+2  A: 

Yes you can use this database to server more than one site. The session provider will take care of the semantics of that.

HTH, Mark

Mark Cooper
A: 

Yes , you can

chugh97