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

4

1 回答 1

3

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

于 2010-11-24T18:39:17.087 回答