设置会话sql模式时遇到问题?
|
<add name=\"SqlState\" connectionString=\"Data Source=localhost;DataBase=AnyNameOfServerState;Integrated Security=True\" providerName=\"System.Data.SqlClient\"/>
<sessionState mode=\"SQLServer\" sqlConnectionString=\"SqlState\" allowCustomSqlDatabase=\"true\" cookieless=\"false\" timeout=\"20\"/>
我试图将以上两行放入我的web.config文件中,然后运行代码:
我懂了:
System.Data.SqlClient.SqlException:
MSDN给我以下提示:
验证您使用有效的凭据进行连接。
Make sure that the credentials you are supplying are valid. For more information, see How to: Access SQL Server Using Predetermined Credentials.
验证服务器名称正确并且服务器正在运行。
Make sure that you are using the correct server name, and that the server can be reached.
但是我不知道如何遵循它们,因为这是我第一次在SQL模式下使用Session,...
更多说明:我暂时需要几秒钟的会话,我需要保存已获得的动态控件的状态。我认为该状态模式可能会遇到的问题是,如果它与用户拖动20分钟,会使我的应用程序变慢。我应该改用viewState吗?
没有找到相关结果
已邀请:
1 个回复
臀博