.NET Core解决MVC视图中的中文被html编码的问题

比如下面的Razor视图代码:

输出的html代码变成了:

<title>&#x4EE3;&#x7801;&#x6539;&#x53D8;&#x4E16;&#x754C;</title>

 

阅读全文 .NET Core解决MVC视图中的中文被html编码的问题

ASP.NET Core 实现用户登录验证的最低配置

网上找的备用。

背景是在一个项目中增加临时登录功能,只需验证用户是否登录即可,所需的最低配置与实现代码如下。

在 Startup 的 ConfigureServices() 方法中添加 Authentication 的配置:

在 Startup 的 Configure() 方法中将 Authentication 添加到请求管线:

在登录程序中验证通过用户名/密码后,通过下面的代码生成登录 Cookie 并发送给客户端:

How to enable NTFS Long Paths in Windows 10

解决源文件名长度大于文件系统支持的长度问题

In Windows 10 Anniversary Update, Microsoft finally addressed a long-standing issue that developers faced while doing development – the 260 character limitation for path length. This path length limitation was present in Windows for almost an eternity. In case you don’t know, in all currently released Windows versions, the maximal length of the file path is 260 chars. Starting with build 14352 of Windows 10, which is part of the Anniversary Update (version 1607), this limitation can be bypassed.

阅读全文 How to enable NTFS Long Paths in Windows 10

All Your Images Are Belong to Umbraco

Today I am going to talk to you about a tool that has been shipped within the Umbraco core since v7.1. It powers the Image Cropper property editor but can do much much more to help you build high quality, performant websites. That tool is called ImageProcessor.

ImageProcessor is actually two libraries: ImageProcessor – A library for desktop and web that provides a fluent API allowing you to easily chain methods to deliver the desired output, and ImageProcessor.Web – A web extension to ImageProcessor that allows the developer to perform image manipulation using a Url API of querystring parameters as instructions.

阅读全文 All Your Images Are Belong to Umbraco

TinyMCE4 file_picker_callback

Code for TinyMCE:

阅读全文 TinyMCE4 file_picker_callback

微软良心之作——Visual Studio Code 开源免费跨平台代码编辑器

微软 Visual Studio Code 免费跨平台代码编辑器 – 支持多种编程语言与系统

在 Build 2015 大会上,微软除了发布了 Microsoft Edge 浏览器和新的 Windows 10 系统外,最大的惊喜莫过于宣布推出免费跨平台的 Visual Studio Code 编辑器了!


Visual Studio Code 软件截图

阅读全文 微软良心之作——Visual Studio Code 开源免费跨平台代码编辑器