我正在一个网站上工作,这是我的第一个网络项目。
会议设想
我为我的项目建立了一个安全水平不大高的数据库。 我想为我网站上的每个用户管理会议。 时间只能使用库克群岛和URL。
Now I went over with all four session state modes. i.e 1. InProc 2. State Server 3. Sql Server 4. Custom
现在,在从所有这些模式进行审查之后,我感到困惑的是,如果我使用Sql服务器或习俗的话。
Basically i want to store session related information in my own database instead of Aspnet_db which is a default database provided by microsoft. I have created all tables related to login and registration. But I dont know how to store session into my database. What tables do I need to create so as to maintain into database.
I want to create a complete log of session and login related information into my database(Persistant atleast for 1 year). I want to use machinekey as AES and SHA1.
<sessionState mode="Custom" cookieless="AutoDetect" timeout="15" regenerateExpiredSessionId="true" stateNetworkTimeout="10" >
</sessionState>
<machineKey decryption="AES"
validation="SHA1"
decryptionKey="7E047D50A7E430181CCAF7E0D1771330D15D8A58AEDB8A1158F97EEF59BEB45D"
validationKey="68B439A210151231F3DBB3F3985E220CFEFC0662196B301B84105807E3AD27B6475DFC8BB546EC69421F38C1204ACFF7914188B5003C1DCF3E903E01A03C8578"/>
<add name="conString" connectionString="Data Source=192.168.1.5; Initial Catalog=dbName; Integrated Security=True;" providerName="System.Data.SqlClient" />
在网上会议中需要说明哪些事项?
My Data Source= 192.168.1.5 Database name= db.mdf
www.un.org/Depts/DGACM/index_spanish.htm 我需要了解。
- What tables do i need to add to my database to store session related information. eg. Session id (Any other field is also stored or not), Session Time, Session Start Time, Session End Time, Session Expire Time. I dont know what all things are usually taken.
- Do I need to encrypt Session Id before storing into database. If Yes
加密将是自动的,或者说需要书写一些代码,以便除我在上文网络会议中所写的外。
- How mode= custom will be used into web config using my database.
缩略语
<sessionState mode="Custom" cookieless="AutoDetect" timeout="15" regenerateExpiredSessionId="true" stateNetworkTimeout="10" >
</sessionState>