无效 Web.config 配置数据
Invalid Web.config Configuration Data
我将 web.config
中的 connectionStrings
部分更改为 Integrated Security="True"
以隐藏用户名和密码,但遇到错误:
HTTP Error 500.19 - Internal Server Error The requested page cannot be
accessed because the related configuration data for the page is
invalid.
变更前:
<connectionStrings>
<add connectionString="Server=v-s1;Database=DB1;User ID=Admin;Password=AdminPW;Persist Security Info=True;Max Pool Size=200;Connection Timeout=60" name="MROConstr" />
</connectionStrings>
变更后:
<connectionStrings>
<add connectionString="Server=v-s1;Database=DB1;Integrated Security="True";Max Pool Size=200;Connection Timeout=60" name="V1Constr" />
</connectionStrings>
我很想标记 "Closed/Duplicate",但看这里:
Looks like the user account you're using for your app pool doesn't
have rights to the web site directory, so it can't read config from
there. Check the app pool and see what user it is configured to run
as. Check the directory and see if that user has appropriate rights to
it. While you're at it, check the event log and see if IIS logged any
more detailed diagnostic information there.
具体来说,这听起来像您是 运行 的用户,因为没有权限执行一项或多项需要执行的操作。
另外:
请务必考虑您可能不小心在 web.config 的完全不相关的部分中引入了拼写错误的可能性。理想情况下,您可以 "diff" 您的当前版本和备份 web.config,以确认唯一的更改是您有意做出的更改。
祝你好运 - 一定要 post 找回你找到的东西!
我将 web.config
中的 connectionStrings
部分更改为 Integrated Security="True"
以隐藏用户名和密码,但遇到错误:
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
变更前:
<connectionStrings>
<add connectionString="Server=v-s1;Database=DB1;User ID=Admin;Password=AdminPW;Persist Security Info=True;Max Pool Size=200;Connection Timeout=60" name="MROConstr" />
</connectionStrings>
变更后:
<connectionStrings>
<add connectionString="Server=v-s1;Database=DB1;Integrated Security="True";Max Pool Size=200;Connection Timeout=60" name="V1Constr" />
</connectionStrings>
我很想标记 "Closed/Duplicate",但看这里:
Looks like the user account you're using for your app pool doesn't have rights to the web site directory, so it can't read config from there. Check the app pool and see what user it is configured to run as. Check the directory and see if that user has appropriate rights to it. While you're at it, check the event log and see if IIS logged any more detailed diagnostic information there.
具体来说,这听起来像您是 运行 的用户,因为没有权限执行一项或多项需要执行的操作。
另外:
请务必考虑您可能不小心在 web.config 的完全不相关的部分中引入了拼写错误的可能性。理想情况下,您可以 "diff" 您的当前版本和备份 web.config,以确认唯一的更改是您有意做出的更改。
祝你好运 - 一定要 post 找回你找到的东西!