1

Multiple applications are sharing the same session cookie at the moment and I don't want this to be the case, however, I would like to set the value in code rathr than hardcode a value using the web.config.

Does anyone know how thi can be done?

webnoob
  • 15,747
  • 13
  • 83
  • 165

2 Answers2

0

You can place application specific config files in each application folder and then reference them like this in the web.config:

<authentication configSource="auth.config"></authentication>

In each auth.config, you can then do what you need:

<?xml version="1.0"?>
<authentication mode="Forms">
    <forms loginUrl="app1_login.aspx" timeout="60" name=".APP1" path="/app1" />
</authentication>
jrjensen
  • 191
  • 9
-1

This is how you get it: How to programmatically get session cookie name? but you can surely set it as well..

Community
  • 1
  • 1
Carl Hörberg
  • 5,973
  • 5
  • 41
  • 47