ConnectionString的元素在.NET的.config文件的目的目的、元素、文件、ConnectionString

2023-09-04 08:08:56 作者:久爱变旧爱

存储和读取应用程序的连接字符串中的℃之间的区别是什么C> web.config中的部分?

What is the difference between storing and reading your application's connection string in the <appSettings> and <connectionStrings> sections of web.config?

推荐答案

.NET提供了内置支持来管理连接字符串的以及的,如果在指定的供应商的 &LT;的ConnectionStrings&GT; 部分。

.NET gives built-in support for managing a connection string along with a provider if specified in the <connectionStrings> section.

另外,内置的成员资格和角色提供取决于连接字符串是present在适当的部分。

Also, built-in membership and role providers depend on the connection string being present in the proper section.