Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET SqlServer Session Replication

Curious whether folks have setup 2 way transactional replication on the tables ASP.NET uses for SqlServer stored session state (ASPStateTempSessions and ASPStateTempApplications) and the tables used for membership, role, and personalization? How did it work out? Were there any gotchas?

like image 236
IceNine Avatar asked Apr 22 '26 16:04

IceNine


2 Answers

Clearly you can do that, Just need to edit one of the stored procedure which has a small bug where you would end up with error

Column name or number of supplied values does not match table definition.

to avoid this just change Stored Procedure TempGetAppID

from this

INSERT [YOURDBNAME].dbo.ASPStateTempApplications
            VALUES
            (@appId, @appName)

TO

INSERT [YOURDBNAME].dbo.ASPStateTempApplications
            (AppId,AppName)
            VALUES
            (@appId, @appName)
like image 126
Anuj Pandey Avatar answered Apr 25 '26 09:04

Anuj Pandey


For Membership, you are probably fine with Replication, alhtough a cluster might be better for scale. For state, I would be more inclined to use a cluster.

I would say the exception to this is when you have a geographically separated set of servers, but it is rare to have websites, except for some of the largest, geographically separated out.

Have I ever done replication on state or membership tables? no.

like image 42
Gregory A Beamer Avatar answered Apr 25 '26 09:04

Gregory A Beamer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!