随笔分类 - .net core
摘要:最近想在Docker下调试.NetCore程序报 “error CTC1023: Dockerfile“d:\source\repos\TestLinuxGetIp\TestLinuxGetIp\Dockerfile”的调试程序路径“C:\Users\Administrator\vsdbg\vs20
阅读全文
摘要:1. 修改 Config.cs 2. 修改 Startup.cs 3. 使用PostMan 调用调试 请求参数: client_id:pwdClientclient_secret:secretgrant_type:passwordpassword:123456username:sunxuchu 4.
阅读全文
摘要:输出结果:
阅读全文
摘要:1. vs code 终端执行 dotnet new webapi --name ClientCredentialApi 2. 找到ValuesController.cs 引用 using Microsoft.AspNetCore.Authorization; 3. Nuget 导入 Identit
阅读全文
摘要:1. 使用Vsual Studio Code 终端执行 dotnet new webapi --name IdentityServerSample 命令创建一个webapi 的 IdentityServer4Sample 项目 2. 添加Config.cs 类 3. 修改 Startup.cs 如下
阅读全文
摘要:1. 创建 Context.cs 2. 创建 RequestDelegate.cs 3. 具体实现 4. 运行结果
阅读全文
摘要:1.Startup.cs 下代码 2.创建HomeController添加以下代码 3.视图层展示参数 页面直接通过依赖注入读取配置信息 5.Class 实体类 6.json文件命名为 appsettings.json 7. 配置的热更新(解决了不需要重启网站及时读取配置信息的时候可以使用)@inj
阅读全文
摘要:1.创建一个空的ASP.NET Core Web 应用程序 2.程序包管理控制台执行Install-Package Microsoft.AspNetCore -Version 2.0.1 3.创建json文件命名为:appsettings.json,再添加一个Class类 appsettings.j
阅读全文
摘要:1.使用vs2017创建一个应用台程序 2.使用程序包管理器控制台执行命令 Install-Package Microsoft.AspNetCore -Version 2.0.1 3.创建一个json的文件在目录下 4.创建的json文件默认不会被编译到bin目录下,所有要修改json文件的属性页,
阅读全文

浙公网安备 33010602011771号