奇怪的 Webconfig 和 Mysql 问题

发布于 2025-01-02 14:39:19 字数 1711 浏览 1 评论 0原文

我的网络配置中有两个部分我认为是一个问题。第一个我放了一个箭头指向 到网络配置工具说它有问题的行。我认为这很奇怪 指向最后一行而不是该条目的顶部。当我进入安全选项卡时出现错误 is :

您选择的数据存储有问题。这可能是由无效的服务器名称或凭据引起的, 或许可不足。这也可能是由于未启用角色管理器功能引起的。 单击下面的按钮将重定向到您可以选择新数据存储的页面。

以下消息可能有助于诊断问题: 未知数据库“Database”(D:\ASPX\testing\testing\web.config 第 42 行)

<add applicationName="/" description="MySQL default application"
      connectionStringName="LocalMySqlServer" writeExceptionsToEventLog="False"
      autogenerateschema="True" enablePasswordRetrieval="False" enablePasswordReset="True"
      requiresQuestionAndAnswer="True" requiresUniqueEmail="False"
      passwordFormat="Clear" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7"
      minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10"
      passwordStrengthRegularExpression="" name="MySQLMembershipProvider"
===>>>>>  type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.4.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />

第二个问题与会话状态有关。 PublicKeyToken=c5687fc88969c44d”之后的所有属性都是 标记为“不允许使用属性”

<sessionState mode="Custom" cookieless="true" regenerateExpiredSessionId="true" customProvider="MySqlSessionStateProvider">
   <providers>
        <add name="MySqlSessionStateProvider" type="MySql.Web.SessionState.MySqlSessionStateStore, MySql.Web, Version=6.4.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" applicationName="/" description="" connectionStringName="LocalMySqlServer" writeExceptionsToEventLog="False" autogenerateschema="True"/>
   </providers>
</sessionState>

PS 我尝试使用 MySQL 配置器添加 applicationName 和 Description,但它没有更新 webconfig。

I have two sections in my webconfig that I think are an issue. The first one I put an arrow pointing
to the line that the web configuration tool says it is having problems with. I think its strange that it is
pointing to the last line and not at the top of this entry. The error i have when I go to the security tab
is :

There is a problem with your selected data store. This can be caused by an invalid server name or credentials,
or by insufficient permission. It can also be caused by the role manager feature not being enabled.
Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem:
Unknown database 'Database' (D:\ASPX\testing\testing\web.config line 42)

<add applicationName="/" description="MySQL default application"
      connectionStringName="LocalMySqlServer" writeExceptionsToEventLog="False"
      autogenerateschema="True" enablePasswordRetrieval="False" enablePasswordReset="True"
      requiresQuestionAndAnswer="True" requiresUniqueEmail="False"
      passwordFormat="Clear" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7"
      minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10"
      passwordStrengthRegularExpression="" name="MySQLMembershipProvider"
===>>>>>  type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.4.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />

The second issue is with the session state. All the Attributes after PublicKeyToken=c5687fc88969c44d" are
flagged "attribute is not allowed"

<sessionState mode="Custom" cookieless="true" regenerateExpiredSessionId="true" customProvider="MySqlSessionStateProvider">
   <providers>
        <add name="MySqlSessionStateProvider" type="MySql.Web.SessionState.MySqlSessionStateStore, MySql.Web, Version=6.4.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" applicationName="/" description="" connectionStringName="LocalMySqlServer" writeExceptionsToEventLog="False" autogenerateschema="True"/>
   </providers>
</sessionState>

P.S. I tried adding applicationName and Description using the MySQL Configurator, but it didn't update webconfig.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

江南烟雨〆相思醉 2025-01-09 14:39:19

未知数据库“Database” 表明名为 LocalMySqlServer 的 conn 字符串的数据库名称不正确(或者该 conn 字符串中指定的服务器上不存在数据库名称,或者指定的用户帐户没有访问权限)。

如果您在指定服务器上确实有该数据库,则必须调整该用户的权限。

Unknown database 'Database' suggests that the conn string named LocalMySqlServer has incorrect database name (or database name that doesn't exists on the server specified in that conn string, or that the specified user account doesn't have permissions to access it).

If you do have that database on the specified server, then it must be that permissions for that user need to be adjusted.

眼前雾蒙蒙 2025-01-09 14:39:19

我是如何解决这个错误的。首先我重新安装了 MySQL,我的整个架构仍然存在。这并没有解决问题。然后我删除了架构中的所有表,认为自动生成会重建它们。那也行不通。我最终放弃了架构并重新创建了它。这使得一切都能正常工作。我不知道是什么导致了这个问题,但它一定是架构级别的问题。

How I solved this error. First I reinstalled MySQL, my entire Schema's were still there. That didn't fix the issue. I then dropped all the tables in the schema, thinking that the auto generate would rebuild them. That also didn't work. I ended up dropping the schema and recreating it. This allowed everything to work correctly. I don't know what was causing the issue but it had to be something at the schema level.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文