How to setup sessionState with SQL Server mode on Amazon RDS

前端 未结 2 1168
小鲜肉
小鲜肉 2021-01-15 22:06

I have asp.net app and I\'m going to store my session in SQL Server. I\'m using Amazon RDS (Microsoft SQL Server Express Edition). I am using local db for testing and its wo

相关标签:
2条回答
  • 2021-01-15 23:00

    I've solved my issue create session DB on Amazon RDS.

    1. Create ASPState DB on AWS RDS and database and schema migration using Following Tool SQLAzureMW v5.15.6 Release Binary for SQL Server 2014.
    2. Change DB Name on sessionState mode="SQLServer" allowCustomSqlDatabase="true" sqlConnectionString="data source=amazon-server-name;initial catalog=ASPState;persist security info=True;user id=userid;password=password" cookieless="false" timeout="100">
    0 讨论(0)
  • 2021-01-15 23:06

    You can use sql server session state on SQL RDS.

    You just need to comment out the parts of the InstallSqlState.sql that have to do with creating SQL Server Agent jobs. The script is used when running the aspnet_regsql.exe command. It's located in the framework folder right next to that exe. It doesn't gracefully handle failing to create the jobs, so it doesn't do any of the other steps to install session state.

    Here's what my InstallSqlState.sql ultimately looked like: http://pastebin.com/QJDXC093

    Or alternately, you can run the aspnet_regsql.exe command on a database where you do have permissions to create jobs and then use the import/export feature in management studio to move the resulting database schema from your database to RDS.

    0 讨论(0)
提交回复
热议问题