# .Net

**URL:** https://www.isharkfly.com/c/computer-program/dot-net/19.md

[Latest](https://www.isharkfly.com/latest.md) · [Categories](https://www.isharkfly.com/categories.md) · [Tags](https://www.isharkfly.com/tags.md)

---

## [【.NET】分类](https://www.isharkfly.com/t/net/309)

<div class="topic-metadata">

**Author:** [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Replies:** 0\
**Last updated:** [July 24, 2020, 7:28pm UTC](https://www.isharkfly.com/t/net/309 "2020-07-24T19:28:34Z")

</div>

面试和工作经验的索引请参考 GitHub 上的文档 面试问题和经验 (ossez.com)

---

## [C# AD 执行错误 UpdErr: DSID-031A11FA, problem 6005 (ENTRY\_EXISTS)](https://www.isharkfly.com/t/c-ad-upderr-dsid-031a11fa-problem-6005-entry-exists/18521)

<div class="topic-metadata">

**Author:** [@hex](https://www.isharkfly.com/u/hex)\
**Replies:** 1\
**Last updated:** [December 5, 2025, 1:30am UTC](https://www.isharkfly.com/t/c-ad-upderr-dsid-031a11fa-problem-6005-entry-exists/18521 "2025-12-05T01:30:57Z")

</div>

错误信息为： '(AddResponse)connection.SendRequest(request)' threw an exception of type 'System.DirectoryServices.Protocols.DirectoryOperationException' Data: Count = 0 HResult: -2146233088 HelpLink: null Inner…

---

## [C# AddRequest 创建 AD 用户示例](https://www.isharkfly.com/t/c-addrequest-ad/18454)

<div class="topic-metadata">

**Author:** [@hex](https://www.isharkfly.com/u/hex)\
**Replies:** 1\
**Last updated:** [November 19, 2025, 12:47pm UTC](https://www.isharkfly.com/t/c-addrequest-ad/18454 "2025-11-19T12:47:37Z")

</div>

System.DirectoryServices.Protocols.AddRequest c# 创建用户代码示例

---

## [AI 对开发的辅助确实助力不少](https://www.isharkfly.com/t/ai/18395)

<div class="topic-metadata">

**Author:** [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Replies:** 2\
**Last updated:** [November 7, 2025, 10:50am UTC](https://www.isharkfly.com/t/ai/18395 "2025-11-07T10:50:00Z")

</div>

一直从事的是 Java 软件开发，没有怎么接触过 c#。 但其中一个项目现在就是在 c# 上使用。 使用 AI 对一些数据处理上的要求让 AI 给出帮助。 比从头看数据结构要块得多，虽然写法上有些不同，但原理是相通得。 比如从 List 中生成 Map 的方法，AI 给 C# 的写法就比较简洁。 一个月也只用掉了几块钱，完全是在可以接受的水平上。 AI 的使用还得跟上。

---

## [在 C# 中标记弃用代码](https://www.isharkfly.com/t/c/18412)

<div class="topic-metadata">

**Author:** [@hex](https://www.isharkfly.com/u/hex)\
**Replies:** 3\
**Last updated:** [November 6, 2025, 2:51pm UTC](https://www.isharkfly.com/t/c/18412 "2025-11-06T14:51:52Z")

</div>

c# 如何标记一个类 deprecate.

---

## [C# Dictionary loop to create a new Dictionary by value object attribute](https://www.isharkfly.com/t/c-dictionary-loop-to-create-a-new-dictionary-by-value-object-attribute/17700)

<div class="topic-metadata">

**Author:** [@lucas](https://www.isharkfly.com/u/lucas)\
**Replies:** 1\
**Last updated:** [September 3, 2025, 9:55pm UTC](https://www.isharkfly.com/t/c-dictionary-loop-to-create-a-new-dictionary-by-value-object-attribute/17700 "2025-09-03T21:55:33Z")

</div>

还是比较喜欢 Using LINQ’s ToDictionary() 这个方法。 // Option 2: Using LINQ's ToDictionary() method (more concise) Dictionary\<string, int\> peopleAgeByNameLinq = peopleByName.ToDictionary( personEntry =\> …

---

## [C# 对象自动初始化当前时间戳](https://www.isharkfly.com/t/c/18384)

<div class="topic-metadata">

**Author:** [@hex](https://www.isharkfly.com/u/hex)\
**Replies:** 1\
**Last updated:** [October 29, 2025, 4:39pm UTC](https://www.isharkfly.com/t/c/18384 "2025-10-29T16:39:40Z")

</div>

C# 定义对象如何自动初始化字段当前时间戳

---

## [解决.NET字典的空值问题](https://www.isharkfly.com/t/net/18380)

<div class="topic-metadata">

**Author:** [@hex](https://www.isharkfly.com/u/hex)\
**Replies:** 1\
**Last updated:** [October 28, 2025, 12:49pm UTC](https://www.isharkfly.com/t/net/18380 "2025-10-28T12:49:51Z")

</div>

.net Dictionary 通过 Key 取值空对象问题如何解决。 出现问题的代码在这里： // Update the entitlement with fresh LDAP data LdapEntryData account = currentLdapData\[entitlement.Samaccountname\]…

---

## [ValidateAntiForgeryToken 返回 400 错误排查](https://www.isharkfly.com/t/validateantiforgerytoken-400/18193)

<div class="topic-metadata">

**Author:** [@hex](https://www.isharkfly.com/u/hex)\
**Replies:** 1\
**Last updated:** [October 15, 2025, 8:29pm UTC](https://www.isharkfly.com/t/validateantiforgerytoken-400/18193 "2025-10-15T20:29:41Z")

</div>

.net ValidateAntiForgeryToken return bad request 错误的原因

---

## [Cshtml 不生成 \_\_RequestVerificationToken 字段的原因](https://www.isharkfly.com/t/cshtml-requestverificationtoken/18192)

<div class="topic-metadata">

**Author:** [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Replies:** 0\
**Last updated:** [October 15, 2025, 6:51pm UTC](https://www.isharkfly.com/t/cshtml-requestverificationtoken/18192 "2025-10-15T18:51:06Z")

</div>

出现这个问题主要原因是 form 标签需要显示表达。 丢 \_\_RequestVerificationToken 字段的原因是整个页面中没有 form 表单。 详细解答 当 .cshtml 文件在预期生成 \_\_RequestVerificationToken 隐藏字段，但实际没有生成时，通常有以下几个常见原因： 未使用 Html.AntiForgeryToken() 或 asp-for="RequestVerificat…

---

## [ASP.NET 项目修改 Framework 为 4.8](https://www.isharkfly.com/t/asp-net-framework-4-8/17512)

<div class="topic-metadata">

**Author:** [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Replies:** 1\
**Last updated:** [June 30, 2025, 7:33pm UTC](https://www.isharkfly.com/t/asp-net-framework-4-8/17512 "2025-06-30T19:33:28Z")

</div>

asp.net 如何在 Visual Studio 中修改 framework 为 4.8

---

## [ASP.NET项目升级Framework到4.8](https://www.isharkfly.com/t/asp-net-framework-4-8/17511)

<div class="topic-metadata">

**Author:** [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Replies:** 1\
**Last updated:** [June 30, 2025, 7:31pm UTC](https://www.isharkfly.com/t/asp-net-framework-4-8/17511 "2025-06-30T19:31:54Z")

</div>

asp.net 如何在 Visual Studio 中修改 framework 为 4.8

---

## [ASP.NET网站编译发布方法详解](https://www.isharkfly.com/t/asp-net/17510)

<div class="topic-metadata">

**Author:** [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Replies:** 1\
**Last updated:** [June 30, 2025, 4:00pm UTC](https://www.isharkfly.com/t/asp-net/17510 "2025-06-30T16:00:00Z")

</div>

Asp.net 网站如何编译发布

---

## [Visual Studio 2022 调试老的 ASP 网站时候找不项目模板](https://www.isharkfly.com/t/visual-studio-2022-asp/17501)

<div class="topic-metadata">

**Author:** [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Replies:** 0\
**Last updated:** [June 25, 2025, 12:44pm UTC](https://www.isharkfly.com/t/visual-studio-2022-asp/17501 "2025-06-25T12:44:30Z")

</div>

这个模板在默认的时候是没有安装的。 解决办法 重新调用安装程序，然后选择 .NET 框架项目 这个选项默认没有选择。

---

## [ASP.NET 调用远程 Web Service 项目源码](https://www.isharkfly.com/t/asp-net-web-service/17499)

<div class="topic-metadata">

**Author:** [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Replies:** 3\
**Last updated:** [June 25, 2025, 11:59am UTC](https://www.isharkfly.com/t/asp-net-web-service/17499 "2025-06-25T11:59:22Z")

</div>

给一个 ASP.NET 调用远程 Webservice 的项目和源代码

---

## [IIS 网站运行提示 404.3 错误](https://www.isharkfly.com/t/iis-404-3/17327)

<div class="topic-metadata">

**Author:** [@hex](https://www.isharkfly.com/u/hex)\
**Replies:** 0\
**Last updated:** [May 21, 2025, 3:46pm UTC](https://www.isharkfly.com/t/iis-404-3/17327 "2025-05-21T15:46:51Z")

</div>

根据上面的提示，可能的原因是计算机中没有装 ASP.NET。 可以通过控制面板的属性和特性选项来进行安装。 同时，在 IIS 的配置下也需要启用 ASP 的配置。 单击应用后，Windows 将会下载必要的组件。 整个过程需要一些时间。

---

## [MSOLEDBSQL 数据库配置](https://www.isharkfly.com/t/msoledbsql/17389)

<div class="topic-metadata">

**Author:** [@hex](https://www.isharkfly.com/u/hex)\
**Replies:** 0\
**Last updated:** [June 3, 2025, 1:14pm UTC](https://www.isharkfly.com/t/msoledbsql/17389 "2025-06-03T13:14:29Z")

</div>

需要安装 MSOLEDBSQL Version 18. 下载链接： Download Microsoft OLE DB Driver for SQL Server - OLE DB Driver for SQL Server | Microsoft Learn 通过上面的链接，我们可以下载 18.7.5 版本。 具体的版本还需要把屏往下滚动下。

---

## [IIS svc 文件无法显示](https://www.isharkfly.com/t/iis-svc/17369)

<div class="topic-metadata">

**Author:** [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Replies:** 0\
**Last updated:** [May 30, 2025, 2:25am UTC](https://www.isharkfly.com/t/iis-svc/17369 "2025-05-30T02:25:47Z")

</div>

处理 svc 文件提示错误： HTTP Error 404.3 - Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map. …

---

## [ASP 网站提示错误：Request for the Permission of Type System.Web.AspNetHostingPermission](https://www.isharkfly.com/t/asp-request-for-the-permission-of-type-system-web-aspnethostingpermission/17368)

<div class="topic-metadata">

**Author:** [@hex](https://www.isharkfly.com/u/hex)\
**Replies:** 0\
**Last updated:** [May 29, 2025, 8:27pm UTC](https://www.isharkfly.com/t/asp-request-for-the-permission-of-type-system-web-aspnethostingpermission/17368 "2025-05-29T20:27:29Z")

</div>

错误信息为： \[SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.\] System.Reflection.Assembly.\_GetTy…
