Ivo Queiroz
Ivo Queiroz

Reputation: 21

How to share session between UI and Web Api?

I have two applications. One is the User interface, that stores information like UserID on the session. The other is a web api that communicate with the UI. I need to share this UI session with web api.

1- I know that is not recommended to use session with Web Api, but for my purpose I need to do it.

2- I´m using sessionState mode="SQLServer" because of web farm.

<sessionState mode="SQLServer" sqlConnectionString="Server=servername;Database=dbname;User ID=username;Password=password;Application Name=name;" cookieless="false" allowCustomSqlDatabase="true" timeout="20"/>

<machineKey validationKey="SomeKey" decryptionKey="somekey" validation="SHA1" decryption="AES" />

both applications have the same configuration, but for some reason that i don´t know, it is not doing right.

3 - i´m still developping it locally.

Can someone help me?

Upvotes: 0

Views: 445

Answers (0)

Related Questions