asp.net-core - ASP.NET CORE 中“TransparentNetworkIPResolution”的替代方法是什么
问题描述
我在 SQL 连接字符串中的 ASP.NET MVC 中使用了“ TransparentNetworkIPResolution ”这个关键字。我的代码如下
<add name="LocalString" connectionString="Data Source=Server;Initial Catalog=LocalDBName;User ID=User;Password=****;TransparentNetworkIPResolution=false" providerName="System.Data.SqlClient" />
这给了我一个错误 ASP.NET CORE 错误消息"Keyword doesn't support"。
那么任何人都可以帮我解决这个问题吗?
解决方案
专注于新的 SqlClient 功能改进正在移动到新的 Microsoft.Data.SqlClient 包
请参阅https://github.com/dotnet/SqlClient/issues/99
SqlClient 包的 Github 存储库是:https ://github.com/dotnet/SqlClient
为了反映 API 的当前状态,以下是 .NET Framework 中 System.Data.SqlClient 中存在的类、枚举和成员的列表,而 .NET Core 的 Microsoft.Data.SqlClient 版本中缺少这些类、枚举和成员:
Class SqlDataSourceEnumerator
Class SqlAuthenticationInitializer
Class SqlAuthenticationParameters
Class SqlAuthenticationProvider
Class SqlAuthenticationToken
Class SqlClientLogger
Class SQLDebugging
Enum SqlAuthenticationMethod
Property SqlBulkCopyOptions AllowEncryptedValueModifications
Property SqlCommand NotificationAutoEnlist
Property SqlConnectionStringBuilder AsynchronousProcessing
Property SqlConnectionStringBuilder Authentication
Property SqlConnectionStringBuilder NetworkLibrary
Property SqlConnectionStringBuilder TransparentNetworkIPResolution
Property SqlParameterCollection IsSynchonized
推荐阅读
- c# - GC 是否需要多次收集具有未决终结器的对象?
- python - 无法从父目录导入文件
- sml - 验证二叉树的大小?
- java - 从 01/01/0001 到任何给定日期的天数
- vba - 处理子表单上留空的已编辑字段
- python - 带有 int() 和 str() 的用户输入的 While 循环
- laravel - 我正在使用 ajax 但它显示方法不支持我检查但方法在 ajax 和路由中是相同的
- c++ - 在为该超类的子类制作的数组中使用超类对象时出错
- javascript - 如何使用单个导出从 React 中的 JS 文件中导出所有导入的图像?
- javascript - res.send 在将响应发送到我的 Express 服务器应用程序上的前端之前没有等待我的异步函数完成