English 中文(简体)
开庭状态。 如何以习俗方式管理会议?
原标题:Session state. How to manage session with custom mode?

我正在一个网站上工作,这是我的第一个网络项目。

会议设想

我为我的项目建立了一个安全水平不大高的数据库。 我想为我网站上的每个用户管理会议。 时间只能使用库克群岛和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 我需要了解。

  1. 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.
  2. Do I need to encrypt Session Id before storing into database. If Yes

加密将是自动的,或者说需要书写一些代码,以便除我在上文网络会议中所写的外。

  1. How mode= custom will be used into web config using my database.

缩略语

<sessionState mode="Custom" cookieless="AutoDetect" timeout="15" regenerateExpiredSessionId="true" stateNetworkTimeout="10" > 
</sessionState> 
最佳回答

如果你重新使用服务器会议供应商,你应操作aspnet_regsql,以创建您所需要的表格:

aspnet_regsql –E -S localhost –ssadd –sstype p

(由当地托管人取代) 页: 1

如果你不想让指挥部建立蚊帐数据库,你也可以用悬挂的国旗指定一个海关数据库。 你们也可以在没有旗帜下指挥,使用令人信服的方式。

如果你想要建立习俗会议提供商(而不是小任务),你可以首先研究由上述指挥所管理的文字:

C:WindowsMicrosoft.NETFrameworkv2.0.50727InstallPersistSqlState.sql

虽然这取决于你的要求,但一般而言,会议国的加密并没有增加许多价值。 然而,如果你的数据特别敏感,那么可能值得考虑。 不过,值得注意的是,届会的最大风险通常在非行方面,而是在客户方面,一个用户能够从另一个用户那里偷窃会议,进入会堂。 因此,在我诉诸于在非行方进行加密之前,我至少将使用SSL作为会议座标的所有参考页。

如果是这样的话,我在书中涵盖了定制会议的许多方面,尽管我没有证明完全的习俗提供者:。 Save-Fast ASP.NET

问题回答

问题1:

  1. Depends on how you implement your provider. MSDN will tell you how to do that.
  2. I would say no, but I m not a security expert.

内容提要

  1. What do you mean?




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签