hi I used below code to save session into database:
<add name="AspStateConnectionString" connectionString="Data Source=.;Initial Catalog=ASPState;User ID=sa;Password=2008" providerName="System.Data.SqlClient"/>
and tabel:
CREATE TABLE [dbo].[ASPStateTempSessions](
[SessionId] [nvarchar](88) NOT NULL,
[Created] [datetime] NOT NULL,
[Expires] [datetime] NOT NULL,
[LockDate] [datetime] NOT NULL,
[LockDateLocal] [datetime] NOT NULL,
[LockCookie] [int] NOT NULL,
[Timeout] [int] NOT NULL,
[Locked] [bit] NOT NULL,
[SessionItemShort] [varbinary](7000) NULL,
[SessionItemLong] [image] NULL,
[Flags] [int] NOT NULL,
PRIMARY KEY CLUSTERED
(
[SessionId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[ASPStateTempSessions] ADD DEFAULT (getutcdate()) FOR [Created]
GO
ALTER TABLE [dbo].[ASPStateTempSessions] ADD DEFAULT ((0)) FOR [Flags]
GO
it will save sesstion into database here is below column:
[SessionId] [nvarchar](88) NOT NULL,
[Created] [datetime] NOT NULL,
[Expires] [datetime] NOT NULL,
[LockDate] [datetime] NOT NULL,
[LockDateLocal] [datetime] NOT NULL,
[LockCookie] [int] NOT NULL,
[Timeout] [int] NOT NULL,
[Locked] [bit] NOT NULL,
[SessionItemShort] [varbinary](7000) NULL,
[SessionItemLong] [image] NULL,
[Flags] [int] NOT NULL,
is there any way that in this table I save users IPaddress?
Best regards
Neda