随笔分类 - .net framework
摘要:Thread-safe List<T> property 回答1 If you are targetting .Net 4 there are a few options in System.Collections.Concurrent Namespace You could use Concurr
阅读全文
摘要:The goal of this section is to introduce, discuss, and provide language specific mitigation techniques for HttpOnly. Who developed HttpOnly? When? Acc
阅读全文
摘要:https://indexoutofrange.com/Could_not_load_file_or_assembly_or_one_of_its_dependencies/ Reading assembly binding log files (Fusion Log) This is my pre
阅读全文
摘要:How to resolve .NET reference and NuGet package version conflicts Some problems in programming seem to stay and bother us forever. Much like cockroach
阅读全文
摘要:Prevent Cross-Site Scripting (XSS) in ASP.NET Core Accessing encoders in code The HTML, JavaScript and URL encoders are available to your code in two
阅读全文
摘要:Why use strong named assemblies? Let me list the benefits of strong naming your assembly first: Strong naming your assembly allows you to include your
阅读全文
摘要:https://docs.microsoft.com/en-us/dotnet/api/system.web.httpresponse.redirecttoroute?view=netframework-4.8#System_Web_HttpResponse_RedirectToRoute_Syst
阅读全文
摘要:Assembly Binding redirect: How and Why? Why are binding redirects needed at all? Suppose you have application A that references library B, and also li
阅读全文
摘要:http://www.mimekit.net/docs/html/Getting-Started.htm https://github.com/jstedfast/MailKit
阅读全文
摘要:Can't send mail using SmtpClient The server responds with 5.7.1 Client was not authenticated but only if you do not set UseDefaultCredentials to true.
阅读全文
摘要:打开dll的源码,然后attach到那个加载了反射dll的进程上。 就可以调试dll的代码
阅读全文
摘要:账号不带域名 1326 https://stackoverflow.com/questions/42205992/error-1326-when-wnetaddconnection2-is-run-by-a-local-system-account If the username and passw
阅读全文
摘要:Why you need to understand garbage collection I’ve been interviewing lots of C# developers recently, and one of my stock questions is “how does the .N
阅读全文
摘要:https://docs.microsoft.com/en-us/dotnet/api/system.io.path.combine?view=netframework-4.8#System_IO_Path_Combine_System_String_System_String_ public st
阅读全文
摘要:How do I force my .NET application to run as administrator? You'll want to modify the manifest that gets embedded in the program. This works on Visual
阅读全文
摘要:Generic TryParse You should use the TypeDescriptor class: public static T Convert<T>(this string input) { try { var converter = TypeDescriptor.GetConv
阅读全文
摘要:Single instance of a MemoryCache across multiple application pools on the same server [duplicate] You could create a separate Web Api project and host
阅读全文
摘要:What size do you use for varchar(MAX) in your parameter declaration? In this case you use -1. See also MSDN docs: msdn.microsoft.com/en-us/library/bb3
阅读全文
摘要:https://docs.microsoft.com/en-us/dotnet/api/system.runtime.caching.memorycache?view=netframework-4.8 What's the difference between MemoryCache.Add and
阅读全文
摘要:https://stackoverflow.com/questions/12390971/why-there-is-two-completely-different-version-of-reverse-for-list-and-ienumerabl It is worth noting that
阅读全文