Click here to Skip to main content
15,902,635 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can anyone tell me how to use sqlserver session mode without creating any predifined stored procedures and tables.
Can any one explain how to use this mode by creating our own tables
Posted

Hi,
If i'm correct you want to store the sessions in Sql server without creating any tables.

Here is a sample configuration block that you can add in web.config
XML
<sessionstate>
    mode="SQLServer"
    allowCustomSqlDatabase="true"
    sqlConnectionString="Data Source=.;Initial Catalog=SessionStateDB;"
    cookieless="false"
    timeout="20"
</sessionstate>

Also for furhter information plz refer this articel

http://support.microsoft.com/kb/317604[^]
 
Share this answer
 
v2
Comments
waj1206 17-Dec-12 10:12am    
Thats not my question......
I have only sql express edition installed in my system.Hence i am not able to create preddefined tables and SP's required for sql server session mode.This is my main problem.
Is there any way we can create own own tables and store the sessions in that tables etc.
Based on your latest comment, there's some kind of misunderstanding. SQL Server Express Edition does not have a limitation that would prevent you from creating tables, stored procedures, views, triggers etc beforehand. Express Edition works just like other editions what comes to this aspect. The limitations of Express Edition are mainly related to database size, memory or CPU usage and advanced capabilities.

One thing that could cause confusion is that if you have attached the database to your project, every time you run the application the database in your project may replace the changed database in bin folder. In such case it would look like all modifications are lost.

If that is the case, then one way to tackle the problem is to run Express Edition as normal server (as a background service) and connect to it from the application instead of using user instances.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900