3

In my web.config I have:

<sessionState configSource="SessionState.config">
</sessionState>

In SessionState.config I have:

<sessionState  timeout="90" mode="SQLServer" allowCustomSqlDatabase="true" cookieless="false" sqlConnectionString="Data Source=.;Persist Security Info=True;Integrated Security=True">
</sessionState>

I've tried various incantations but can't seem to get it to work. I get this error:

Parser Error Message: Unable to open configSource file 'SessionState.config'.

From MSDN:

alt text

Of course they don't show an actual example.

I verified that the file is in the bin directory. I also have this working fine for the connection strings section.

How do I use a remote config file for sessionState?

Thanks,

Rick

rboarman
  • 8,248
  • 8
  • 57
  • 87

1 Answers1

3

The SessionState.config file should NOT be in the bin directory but should be in the same directory as the web.config

theChrisKent
  • 15,029
  • 3
  • 61
  • 62
  • 2
    I just figured that out. If I change my config source to configSource="bin\SessionState.config" it works fine. – rboarman Nov 24 '10 at 18:42
  • I modified my App.config and Web.config to both use configSource="bin\connections.config" and that ressolved this issue. – landsteven Jan 07 '14 at 17:57