Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top