在我的 web.config 中,我有:
<sessionState configSource="SessionState.config">
</sessionState>
在 SessionState.config 中我有:
<sessionState timeout="90" mode="SQLServer" allowCustomSqlDatabase="true" cookieless="false" sqlConnectionString="Data Source=.;Persist Security Info=True;Integrated Security=True">
</sessionState>
我尝试过各种咒语,但似乎无法使其发挥作用。我收到此错误:
Parser Error Message: Unable to open configSource file 'SessionState.config'.
来自 MSDN:
当然他们没有展示实际的例子。
我验证该文件位于 bin 目录中。我在连接字符串部分也可以正常工作。
如何使用 sessionState 的远程配置文件?
谢谢
瑞克
最佳答案
SessionState.config 文件不应位于 bin 目录中,而应与 web.config 位于同一目录中
关于asp.net - 使用远程 configSource 文件配置 SessionState,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4270271/