开发者

Configuring SessionState with remote configSource file

开发者 https://www.devze.com 2023-01-26 15:02 出处:网络
In my web.config I have: <sessionState configSource=\"SessionState.config\"> </sessionState>

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:

Configuring SessionState with remote configSource file

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 开发者_Python百科for the connection strings section.

How do I use a remote config file for sessionState?

Thanks,

Rick


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

0

精彩评论

暂无评论...
验证码 换一张
取 消